Jump to content

Recommended Posts

Posted

O8pNqhD.png

---- Minecraft Crash Report ----
// There are four lights!

Time: 5/16/20 12:36 AM
Description: Initializing game

java.lang.NullPointerException: null key in entry: null=10
    at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:32) ~[guava-21.0.jar:?] {}
    at com.google.common.collect.SingletonImmutableBiMap.<init>(SingletonImmutableBiMap.java:42) ~[guava-21.0.jar:?] {}
    at com.google.common.collect.ImmutableBiMap.of(ImmutableBiMap.java:73) ~[guava-21.0.jar:?] {}
    at com.google.common.collect.ImmutableMap.of(ImmutableMap.java:120) ~[guava-21.0.jar:?] {}
    at shadows.apotheosis.ench.objects.ItemHellBookshelf.func_150895_a(ItemHellBookshelf.java:47) ~[?:3.1.1] {re:classloading}
    at net.minecraft.client.Minecraft.func_193986_ar(Minecraft.java:596) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:434) [?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(SourceFile:166) [?:?] {re:classloading}
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] {}
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] {}
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] {}
    at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] {}
    at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:56) [forge-1.15.2-31.2.0.jar:31.2] {}
    at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$469/79121205.call(Unknown Source) [forge-1.15.2-31.2.0.jar:31.2] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.1.0.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.1.0.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.1.0.jar:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.1.0.jar:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.1.0.jar:?] {}


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
    at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:32)
    at com.google.common.collect.SingletonImmutableBiMap.<init>(SingletonImmutableBiMap.java:42)
    at com.google.common.collect.ImmutableBiMap.of(ImmutableBiMap.java:73)
    at com.google.common.collect.ImmutableMap.of(ImmutableMap.java:120)
    at shadows.apotheosis.ench.objects.ItemHellBookshelf.func_150895_a(ItemHellBookshelf.java:47)
    at net.minecraft.client.Minecraft.func_193986_ar(Minecraft.java:596)
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:434)

-- Initialization --
Details:
Stacktrace:
    at net.minecraft.client.main.Main.main(SourceFile:166)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:56)
    at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$469/79121205.call(Unknown Source)
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54)
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72)
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:81)
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)

-- System Details --
Details:
    Minecraft Version: 1.15.2
    Minecraft Version ID: 1.15.2
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_51, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 9406391824 bytes (8970 MB) / 10603200512 bytes (10112 MB) up to 10737418240 bytes (10240 MB)
    CPUs: 6
    JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx10G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
    ModLauncher: 5.1.0+69+master.79f13f7
    ModLauncher launch target: fmlclient
    ModLauncher naming: srg
    ModLauncher services: 
        /eventbus-2.2.0-service.jar eventbus PLUGINSERVICE 
        /forge-1.15.2-31.2.0.jar object_holder_definalize PLUGINSERVICE 
        /forge-1.15.2-31.2.0.jar runtime_enum_extender PLUGINSERVICE 
        /accesstransformers-2.1.1-shadowed.jar accesstransformer PLUGINSERVICE 
        /forge-1.15.2-31.2.0.jar capability_inject_definalize PLUGINSERVICE 
        /forge-1.15.2-31.2.0.jar runtimedistcleaner PLUGINSERVICE 
        /preview_OptiFine_1.15.2_HD_U_G1_pre13.jar OptiFine TRANSFORMATIONSERVICE 
        /forge-1.15.2-31.2.0.jar fml TRANSFORMATIONSERVICE 
        /OptiForge-MC1.15.2-0.1.11.jar optiforge TRANSFORMATIONSERVICE 
        /MixinBootstrap-1.0.2.jar mixinbootstrap TRANSFORMATIONSERVICE 
        /MixinBootstrap-1.0.2.jar mixin PLUGINSERVICE 
        /MixinBootstrap-1.0.2.jar mixinbootstrap PLUGINSERVICE 
    FML: 31.2
    Forge: net.minecraftforge:31.2.0
    FML Language Providers: 
        [email protected]
        minecraft@1
    Mod List: 
        SaveMyStronghold-1.15.2-1.0.0.jar Save My Stronghold! {[email protected] LOAD_REGISTRIES}
        inventorysorter-1.15.2-17.0.0.jar Simple Inventory Sorter {[email protected] LOAD_REGISTRIES}
        pamhc2trees-1.15.2-1.0.4.jar Pam's HarvestCraft 2 Fruit Trees {pamhc2trees@version LOAD_REGISTRIES}
        curiousshulkerboxes-FORGE-1.15.2-2.0.0.1.jar Curious Shulker Boxes {[email protected] LOAD_REGISTRIES}
        jei-1.15.2-6.0.0.3.jar Just Enough Items {[email protected] LOAD_REGISTRIES}
        OptiForge-MC1.15.2-0.1.11.jar OptiForge {[email protected] LOAD_REGISTRIES}
        extendedslabs-1.0.jar Extended Slabs {[email protected] LOAD_REGISTRIES}
        Abnormals-Core-1.15.2-v1.0.4.jar Abnormals Core {[email protected] LOAD_REGISTRIES}
        caelus-FORGE-1.15.2-2.0-beta2.jar Caelus API {[email protected] LOAD_REGISTRIES}
        Neat+1.6-20.jar Neat {[email protected] LOAD_REGISTRIES}
        XaerosWorldMap_1.5.7_Forge_1.15.2.jar Xaero's World Map {[email protected] LOAD_REGISTRIES}
        RingOfRepair-1.15.2-1.1.29.jar Ring of Repair {[email protected] LOAD_REGISTRIES}
        ResourcefulTools-1.15.2-1.1.34.jar Resourceful Tools {[email protected] LOAD_REGISTRIES}
        Controlling-6.1.4.jar Controlling {[email protected] LOAD_REGISTRIES}
        sweetconcrete-1.15.2-1.7.1.jar Sweet Concrete {[email protected] LOAD_REGISTRIES}
        Placebo-1.15.2-3.0.2.jar Placebo {[email protected] LOAD_REGISTRIES}
        comforts-FORGE-1.15.2-2.0.0.2.jar Comforts {[email protected] LOAD_REGISTRIES}
        curioofundying-FORGE-1.15.2-3.0.jar Curio of Undying {[email protected] LOAD_REGISTRIES}
        Bookshelf-1.15.2-5.5.34.jar Bookshelf {[email protected] LOAD_REGISTRIES}
        RingOfTeleport-1.15.2-1.1.28.jar Ring of Teleport {[email protected] LOAD_REGISTRIES}
        mcjtylib-1.15-4.0.3-alpha.jar McJtyLib {[email protected] LOAD_REGISTRIES}
        Apotheosis-1.15.2-3.1.1.jar Apotheosis {[email protected] LOAD_REGISTRIES}
        Hwyla-forge-1.10.8-B72_1.15.2.jar Waila {waila@version LOAD_REGISTRIES}
        ToastControl-1.15.2-3.0.1.jar Toast Control {[email protected] LOAD_REGISTRIES}
        CraftTweaker-1.15.2-6.0.0.17.jar CraftTweaker {[email protected] LOAD_REGISTRIES}
        forge-1.15.2-31.2.0-universal.jar Forge {[email protected] LOAD_REGISTRIES}
        PatchouliQuests-1.15.2-1.3.3.jar Patchouli Quests {[email protected] LOAD_REGISTRIES}
        CraftingTweaks_1.15.1-11.0.0.jar Crafting Tweaks {[email protected] LOAD_REGISTRIES}
        forge-1.15.2-31.2.0-client.jar Minecraft {[email protected] LOAD_REGISTRIES}
        EnchantmentDescriptions-1.15.2-2.0.8.jar EnchantmentDescriptions {[email protected] LOAD_REGISTRIES}
        MouseTweaks-2.13-mc1.15.1.jar Mouse Tweaks {[email protected] LOAD_REGISTRIES}
        EasySteel-1.15.2-1.1.73.jar Easy Steel & More {[email protected] LOAD_REGISTRIES}
        BiomesOPlenty-1.15.2-10.0.0.345-universal.jar Biomes O' Plenty {[email protected] ERROR}
        pamhc2crops-1.15.2-1.0.4.jar Pam's HarvestCraft 2 Crops {pamhc2crops@version LOAD_REGISTRIES}
        RingOfGrowth-1.15.2-1.1.29.jar Ring of Growth {[email protected] LOAD_REGISTRIES}
        curios-FORGE-1.15.2-2.0.2.2.jar Curios API {[email protected] LOAD_REGISTRIES}
        Savage-and-Ravage-1.15.2-v1.1.0.jar Savage & Ravage {[email protected] LOAD_REGISTRIES}
        Patchouli-1.15.2-1.2-33.jar Patchouli {[email protected] LOAD_REGISTRIES}
        Xaeros_Minimap_20.9.0_Forge_1.15.2.jar Xaero's Minimap {[email protected] LOAD_REGISTRIES}
        RingOfBlink-1.15.2-1.1.27.jar Ring of Blink {[email protected] LOAD_REGISTRIES}
        FastWorkbench-1.15.1-3.0.0.jar FastWorkbench {[email protected] LOAD_REGISTRIES}
        RingOfMiner-1.15.2-1.1.27.jar Ring of Miner {[email protected] LOAD_REGISTRIES}
        StorageDrawers-1.15.2-7.0.2.jar Storage Drawers {[email protected] LOAD_REGISTRIES}
        OreExcavation-1.7.151.jar Ore Excavation {oreexcavation@NONE LOAD_REGISTRIES}
        lottaterracotta-1.15.2-1.2.1.jar Lotta Terracotta {[email protected] LOAD_REGISTRIES}
        Gobber2-1.15.2-2.2.93.jar Gobber 2 {[email protected] LOAD_REGISTRIES}
        RingOfEnderchest-1.15.2-1.1.30.jar Ring of Enderchest {[email protected] LOAD_REGISTRIES}
        PowderPower-1.15.2-3.1.63.jar Powder Power {[email protected] LOAD_REGISTRIES}
        worldedit-forge-mc1.15.2-7.1.0.jar WorldEdit {[email protected];48cc31c LOAD_REGISTRIES}
        FastFurnace-1.15.1-3.0.0.jar FastFurnace {[email protected] LOAD_REGISTRIES}
        furniture-7.0.0-pre16-1.15.1.jar MrCrayfish's Furniture Mod {[email protected] LOAD_REGISTRIES}
        curiouselytra-FORGE-1.15.2-2.0.jar Curious Elytra {[email protected] LOAD_REGISTRIES}
        cherishedworlds-FORGE-1.15.2-3.0.jar Cherished Worlds {[email protected] LOAD_REGISTRIES}
        moredragoneggs-1.0.jar More Dragon Eggs {[email protected] LOAD_REGISTRIES}
        RingOfAttraction-1.15.2-1.1.32.jar Ring of Attraction {[email protected] LOAD_REGISTRIES}
        RingOfReturn-1.15.2-1.0.11.jar Ring of Return {[email protected] LOAD_REGISTRIES}
        FastLeafDecay-v22.jar FastLeafDecay {fastleafdecay@v22 LOAD_REGISTRIES}
        DefaultOptions_1.15.2-11.0.1.jar Default Options {[email protected] LOAD_REGISTRIES}
    Launched Version: 1.15.2-forge-31.2.0
    Backend library: LWJGL version 3.2.2 build 10
    Backend API: GeForce GTX 1070/PCIe/SSE2 GL version 4.6.0 NVIDIA 442.59, NVIDIA Corporation
    GL Caps: Using framebuffer using OpenGL 3.0
    Using VBOs: Yes
    Is Modded: Definitely; Client brand changed to 'forge'
    Type: Client (map_client.txt)
    CPU: 6x Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz
    OptiFine Version: OptiFine_1.15.2_HD_U_G1_pre13
    OptiFine Build: 20200401-232147
    Render Distance Chunks: 20
    Mipmaps: 4
    Anisotropic Filtering: 1
    Antialiasing: 0
    Multitexture: false
    Shaders: Sildurs High
    OpenGlVersion: 4.6.0 NVIDIA 442.59
    OpenGlRenderer: GeForce GTX 1070/PCIe/SSE2
    OpenGlVendor: NVIDIA Corporation
    CpuCount: 6

 

MinecraftLauncher_7PGrqkWj1Q.png

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I know that this may be a basic question, but I am very new to modding. I am trying to have it so that I can create modified Vanilla loot tables that use a custom enchantment as a condition (i.e. enchantment present = item). However, I am having trouble trying to implement this; the LootItemRandomChanceWithEnchantedBonusCondition constructor needs a Holder<Enchantment> and I am unable to use the getOrThrow() method on the custom enchantment declared in my mod's enchantments class. Here is what I have so far in the GLM:   protected void start(HolderLookup.Provider registries) { HolderLookup.RegistryLookup<Enchantment> registrylookup = registries.lookupOrThrow(Registries.ENCHANTMENT); LootItemRandomChanceWithEnchantedBonusCondition lootItemRandomChanceWithEnchantedBonusCondition = new LootItemRandomChanceWithEnchantedBonusCondition(0.0f, LevelBasedValue.perLevel(0.07f), registrylookup.getOrThrow(*enchantment here*)); this.add("nebu_from_deepslate", new AddItemModifier(new LootItemCondition[]{ LootItemBlockStatePropertyCondition.hasBlockStateProperties(Blocks.DEEPSLATE).build(), LootItemRandomChanceCondition.randomChance(0.25f).build(), lootItemRandomChanceWithEnchantedBonusCondition }, OrichalcumItems.NEBU.get())); }   Inserting Enchantments.[vanilla enchantment here] actually works but trying to declare an enchantment from my custom enchantments class as [mod enchantment class].[custom enchantment] does not work even though they are both a ResourceKey and are registered in Registries.ENCHANTMENT. Basically, how would I go about making it so that a custom enchantment declared as a ResourceKey<Enchantment> of value ResourceKey.create(Registries.ENCHANTMENT, ResourceLocation.fromNamespaceAndPath([modid], [name])), declared in a seperate enchantments class, can be used in the LootItemRandomChanceWithEnchantedBonusCondition constructor as a Holder? I can't use getOrThrow() because there is no level or block entity/entity in the start() method and it is running as datagen. It's driving me nuts.
    • Hi here is an update. I was able to fix the code so my mod does not crash Minecraft. Please understand that I am new to modding but I honestly am having a hard time understanding how anyone can get this to work without having extensive programming and debugging experience as well as searching across the Internet, multiple gen AI bots (claude, grok, openai), and examining source code hidden in the gradle directory and in various github repositories. I guess I am wrong because clearly there are thousands of mods so maybe I am just a newbie. Ok, rant over, here is a step by step summary so others can save the 3 days it took me to figure this out.   1. First, I am using forge 54.1.0 and Minecraft 1.21.4 2. I am creating a mod to add a shotgun to Minecraft 3. After creating the mod and compiling it, I installed the .jar file to the proper directory in Minecraft and used 1.21.4-forge-54.1.0 4. The mod immediately crashed with the error: Caused by: java.lang.NullPointerException: Item id not set 5. Using the stack trace, I determined that the Exception was being thrown from the net.minecraft.world.item.Item.Properties class 6. It seems that there are no javadocs for this class, so I used IntelliJ which was able to provide a decompiled version of the class, which I then examined to see the source of the error. Side question: Are there javadocs? 7. This method, specifically, was the culprit: protected String effectiveDescriptionId() {      return this.descriptionId.get(Objects.requireNonNull(this.id, "Item id not set"));  } 8. Now my quest was to determine how to set this.id. Looking at the same source file, I determined there was another method:  public Item.Properties setId(ResourceKey<Item> pId) {             this.id = pId;             return this;   } 9. So now, I need to figure out how to call setId(). This required working backwards a bit. Starting from the constructor, I stubbed out the variable p which is of type Item.Properties public static final RegistryObject<Item> SHOTGUN = ITEMS.register("shotgun", () -> new ShotgunItem(p)); Rather than putting this all on one line, I split it up for readability like this: private static final Item.Properties p = new Item.Properties().useItemDescriptionPrefix().setId(rk); Here is was the missing function, setId(), which takes a type of ResourceKey<Item>. My next problem is that due to the apparent lack of documentation (I tried searching the docs on this site) I could not determine the full import path to ResourceKey. I did some random searching on the Internet and stumbled across a Github repository which gave two clues: import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; Then I created the rk variable like this: private static ResourceKey<Item> rk = ResourceKey.create(Registries.ITEM, ResourceLocation.parse("modid:shotgunmod")); And now putting it all together in order: private static ResourceKey<Item> rk = ResourceKey.create(Registries.ITEM, ResourceLocation.parse("modid:shotgunmod")); private static final Item.Properties p = new Item.Properties().useItemDescriptionPrefix().setId(rk); public static final RegistryObject<Item> SHOTGUN = ITEMS.register("shotgun", () -> new ShotgunItem(p)); This compiled and the mod no longer crashes. I still have more to do on it, but hopefully this will save someone hours. I welcome any feedback and if I missed some obvious modding resource or tutorial that has this information. If not, I might suggest we add it somewhere for people trying to write a mod that doesn't crash. Thank you !!!  
    • I will keep adding to this thread with more information in case anyone can help, or at the very least I can keep my troubleshooting organized. I decided to downgrade to 54.1.0 in the hopes that this would fix the issue but it didn't. At least now I am on a "recommended" version. The crash report did confirm my earlier post that the Exception is coming from effectiveDescriptionId(). I'll continue to see if I can find a way to set the ID manually.   Caused by: java.lang.NullPointerException: Item id not set         at java.base/java.util.Objects.requireNonNull(Objects.java:259) ~[?:?]         at TRANSFORMER/[email protected]/net.minecraft.world.item.Item$Properties.effectiveDescriptionId(Item.java:465) ~[forge-1.21.4-54.1.0-client.jar!/:?]         at TRANSFORMER/[email protected]/net.minecraft.world.item.Item.<init>(Item.java:111) ~[forge-1.21.4-54.1.0-client.jar!/:?]         at TRANSFORMER/[email protected]/com.example.shotgunmod.ShotgunItem.<init>(ShotgunItem.java:19) ~[shotgunmod-1.0.0.jar!/:1.0.0]         at TRANSFORMER/[email protected]/com.example.shotgunmod.ModItems.lambda$static$0(ModItems.java:15) ~[shotgunmod-1.0.0.jar!/:1.0.0]         at TRANSFORMER/[email protected]/net.minecraftforge.registries.DeferredRegister$EventDispatcher.lambda$handleEvent      
    • It just randomly stop working after a rebooted my dedicated server PLEASE HELP!   com.google.gson   Failed to start the minecraft server com.google.gson.JsonSyntaxException: Expected a com.google.gson.JsonObject but was com.google.gson.JsonPrimitive; at path $  
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.