Jump to content

Recommended Posts

Posted

I have Error code:

Internal Exception: io.netty.handler.codec.decoderException: java.lang.NullPointerException: Cannot invoke "net.minecraft.network.connectionProtocol$PacketSet.m_178327_(int,net.minecraft.network.FriendlyByteBuf)"because the return value of "java.util.Map.get(Object)" is null

 

log files:

[00:04:44] [main/INFO]: ModLauncher running: args [--username, BiggieCheese187, --version, forge-43.2.8, --gameDir, C:\Users\tayla\curseforge\minecraft\Install, --assetsDir, C:\Users\tayla\curseforge\minecraft\Install\assets, --assetIndex, 1.19, --uuid, 6c32a170c4964a2cb7095d21d96ee14b, --accessToken, ????????, --clientId, ODMzM2Y0ZmItMmJiNC00ZTYyLTljYmItYjdlNjg0MjU2Mzli, --xuid, 2535435695207113, --userType, msa, --versionType, release, --width, 1024, --height, 768, --launchTarget, forgeclient, --fml.forgeVersion, 43.2.8, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853]
[00:04:44] [main/INFO]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.3 by Microsoft; OS Windows 10 arch amd64 version 10.0
[00:04:44] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/C:/Users/tayla/curseforge/minecraft/Install/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2397!/ Service=ModLauncher Env=CLIENT
[00:04:44] [main/WARN]: Configuration file C:\Users\tayla\curseforge\minecraft\Install\config\fml.toml is not correct. Correcting
[00:04:44] [main/WARN]: Incorrect key [defaultConfigPath] was corrected from null to defaultconfigs
[00:04:45] [main/WARN]: Mod file C:\Users\tayla\curseforge\minecraft\Install\libraries\net\minecraftforge\fmlcore\1.19.2-43.2.8\fmlcore-1.19.2-43.2.8.jar is missing mods.toml file
[00:04:45] [main/WARN]: Mod file C:\Users\tayla\curseforge\minecraft\Install\libraries\net\minecraftforge\javafmllanguage\1.19.2-43.2.8\javafmllanguage-1.19.2-43.2.8.jar is missing mods.toml file
[00:04:45] [main/WARN]: Mod file C:\Users\tayla\curseforge\minecraft\Install\libraries\net\minecraftforge\lowcodelanguage\1.19.2-43.2.8\lowcodelanguage-1.19.2-43.2.8.jar is missing mods.toml file
[00:04:45] [main/WARN]: Mod file C:\Users\tayla\curseforge\minecraft\Install\libraries\net\minecraftforge\mclanguage\1.19.2-43.2.8\mclanguage-1.19.2-43.2.8.jar is missing mods.toml file
[00:04:45] [main/INFO]: Found mod file fmlcore-1.19.2-43.2.8.jar of type LIBRARY with provider net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@4351171a
[00:04:45] [main/INFO]: Found mod file javafmllanguage-1.19.2-43.2.8.jar of type LANGPROVIDER with provider net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@4351171a
[00:04:45] [main/INFO]: Found mod file lowcodelanguage-1.19.2-43.2.8.jar of type LANGPROVIDER with provider net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@4351171a
[00:04:45] [main/INFO]: Found mod file mclanguage-1.19.2-43.2.8.jar of type LANGPROVIDER with provider net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@4351171a
[00:04:45] [main/INFO]: Found mod file client-1.19.2-20220805.130853-srg.jar of type MOD with provider net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@4351171a
[00:04:45] [main/INFO]: Found mod file forge-1.19.2-43.2.8-universal.jar of type MOD with provider net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@4351171a
[00:04:45] [main/INFO]: No dependencies to load found. Skipping!
[00:04:46] [main/INFO]: Launching target 'forgeclient' with arguments [--version, forge-43.2.8, --gameDir, C:\Users\tayla\curseforge\minecraft\Install, --assetsDir, C:\Users\tayla\curseforge\minecraft\Install\assets, --uuid, 6c32a170c4964a2cb7095d21d96ee14b, --username, BiggieCheese187, --assetIndex, 1.19, --accessToken, ????????, --clientId, ODMzM2Y0ZmItMmJiNC00ZTYyLTljYmItYjdlNjg0MjU2Mzli, --xuid, 2535435695207113, --userType, msa, --versionType, release, --width, 1024, --height, 768]
[00:04:49] [pool-3-thread-1/INFO]: Building unoptimized datafixer
[00:04:51] [Render thread/WARN]: Assets URL 'union:/C:/Users/tayla/curseforge/minecraft/Install/libraries/net/minecraft/client/1.19.2-20220805.130853/client-1.19.2-20220805.130853-srg.jar%23151!/assets/.mcassetsroot' uses unexpected schema
[00:04:51] [Render thread/WARN]: Assets URL 'union:/C:/Users/tayla/curseforge/minecraft/Install/libraries/net/minecraft/client/1.19.2-20220805.130853/client-1.19.2-20220805.130853-srg.jar%23151!/data/.mcassetsroot' uses unexpected schema
[00:04:51] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[00:04:51] [Render thread/INFO]: Setting user: BiggieCheese187
[00:04:52] [Render thread/INFO]: Backend library: LWJGL version 3.3.1 build 7
[00:04:52] [modloading-worker-0/INFO]: Forge mod loading, version 43.2.8, for MC 1.19.2 with MCP 20220805.130853
[00:04:52] [modloading-worker-0/INFO]: MinecraftForge v43.2.8 Initialized
[00:04:54] [Render thread/INFO]: Reloading ResourceManager: Default, Mod Resources
[00:04:54] [modloading-worker-0/WARN]: Configuration file C:\Users\tayla\curseforge\minecraft\Install\config\forge-client.toml is not correct. Correcting
[00:04:54] [modloading-worker-0/WARN]: Incorrect key client was corrected from null to its default, SimpleCommentedConfig:{}. 
[00:04:54] [modloading-worker-0/WARN]: Incorrect key client.alwaysSetupTerrainOffThread was corrected from null to its default, false. 
[00:04:54] [modloading-worker-0/WARN]: Incorrect key client.experimentalForgeLightPipelineEnabled was corrected from null to its default, false. 
[00:04:54] [modloading-worker-0/WARN]: Incorrect key client.showLoadWarnings was corrected from null to its default, true. 
[00:04:54] [modloading-worker-0/WARN]: Incorrect key client.useCombinedDepthStencilAttachment was corrected from null to its default, false. 
[00:04:54] [modloading-worker-0/WARN]: Incorrect key client.compressLanIPv6Addresses was corrected from null to its default, true. 
[00:04:54] [modloading-worker-0/WARN]: Configuration file C:\Users\tayla\curseforge\minecraft\Install\config\forge-common.toml is not correct. Correcting
[00:04:54] [modloading-worker-0/WARN]: Incorrect key general was corrected from null to its default, SimpleCommentedConfig:{}. 
[00:04:54] [modloading-worker-0/WARN]: Incorrect key general.cachePackAccess was corrected from null to its default, true. 
[00:04:54] [modloading-worker-0/WARN]: Incorrect key general.indexVanillaPackCachesOnThread was corrected from null to its default, false. 
[00:04:54] [modloading-worker-0/WARN]: Incorrect key general.indexModPackCachesOnThread was corrected from null to its default, false. 
[00:04:54] [Forge Version Check/INFO]: [forge] Starting version check at https://files.minecraftforge.net/net/minecraftforge/forge/promotions_slim.json
[00:04:55] [Forge Version Check/INFO]: [forge] Found status: OUTDATED Current: 43.2.8 Target: 43.2.11
[00:05:01] [Render thread/INFO]: Stopping!
[00:05:01] [Render thread/ERROR]: Shutdown failure!
java.util.ConcurrentModificationException: null
    at java.util.HashMap.forEach(HashMap.java:1424) ~[?:?]
    at net.minecraft.client.renderer.texture.TextureManager.close(TextureManager.java:176) ~[client-1.19.2-20220805.130853-srg.jar%23151!/:?]
    at net.minecraft.client.Minecraft.close(Minecraft.java:1036) ~[client-1.19.2-20220805.130853-srg.jar%23151!/:?]
    at net.minecraft.client.Minecraft.m_91393_(Minecraft.java:1010) ~[client-1.19.2-20220805.130853-srg.jar%23151!/:?]
    at net.minecraft.client.main.Main.m_239872_(Main.java:228) ~[client-1.19.2-20220805.130853-srg.jar%23151!/:?]
    at net.minecraft.client.main.Main.main(Main.java:51) ~[client-1.19.2-20220805.130853-srg.jar%23151!/:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
    at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:27) ~[fmlloader-1.19.2-43.2.8.jar%23101!/:?]
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-10.0.8.jar%2388!/:?]
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-10.0.8.jar%2388!/:?]
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-10.0.8.jar%2388!/:?]
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-10.0.8.jar%2388!/:?]
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.8.jar%2388!/:?]
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-10.0.8.jar%2388!/:?]
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-10.0.8.jar%2388!/:?]
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) [bootstraplauncher-1.1.2.jar:?]
 

Posted

You need to post your logs/debug.log and do it on a file sharing site.

The log above doesn't even show you connecting to a server.

 

The error says one of your mods has broken networking.

These are usually difficult to track down and normally require you to experiment with removing mods to find the problem mod.

 

But you can try adding the following to your "java arguments" (same place you set the -Xmx memory value)

-Dforge.logging.mojang.level=debug

This will add Mojang's network debug logging to the logs/debug.log

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Posted

That's not the debug.log

It also says you can't connect to the server.

Quote

[16:29:49] [Server Connector #2/ERROR]: Couldn't connect to server io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: xxxxx

Caused by: java.net.ConnectException: Connection refused: no further information

So either your connection information is incorrect, there is something wrong with your networking or the server is not running.

  • Haha 1

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Posted (edited)

the server goes offline as soon as i start it 

im pretty sure i catched the right one now 

i have some problems to concert bc its very big

 

Edited by Biggie
Posted

That's the server debug.log

It doesn't show anybody trying to connect?

It's unlikely to have the network error you originally posted anyway, because that will be on the client.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

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.