Jump to content

Recommended Posts

Posted

So after several days of being stumped, It's time to ask I guess: I'm not quite sure how to handle packets.

 

I have a Gui Overlay that draws from data in my custom IExtendedEntityProperties, and never updates when connected to a server.

I gathered from googling that the server and client has it's own instance of that or something, so I need to send packets to update the client's.

I followed the tutorial I found here on the forums to setup SimpleNetworkWrapper, and made a message to send the NBT data (http://pastebin.com/sMMePZ7P)

but now... I don't know where to send it from? I tried putting it in the extended player stats class and running it when values change using:

 

 

if (!player.worldObj.isRemote)

{

System.out.println("Sending packet: Player.NBT to EntityPlayerMP player");

PacketPipeline.sendTo(new SyncPlayerPropsPacket(player), (EntityPlayerMP) player);

}

 

 

Which just.. sorta crashes. It prints out the number of mana remaining, and prints that it's sending the packet... and then disconnects.  The server doesn't close, and the client doesn't close but it kicks you from the server with a fatal error.. no more information just "A fatal error has occured, connection is terminated", the server just says player disconnected.. so I don't really know where to go from here or how to fix it.

Developing the Spiral Power Mod .

こんにちは!お元気ですか?

Posted

Sure thing. The link in the first post is the custom packet itself. Here's everything else that could be relevant?

 

 

Extended Player Stats:

http://pastebin.com/uU8nwVv5

 

Abstract Packet:

http://pastebin.com/rTcrjwjm

 

Packet "Pipeline":

http://pastebin.com/imwkyabx

 

Living Fall Event Handler:

http://pastebin.com/neKFqSyQ

 

Gui Bar:

http://pastebin.com/3qg9DSpC

 

The crash (not very helpful really):

BBS245b.png

 

 

If anything else would help, I can post that too.

 

 

Developing the Spiral Power Mod .

こんにちは!お元気ですか?

Posted

I will read your code in just a second.

But before I do that, in your forge folder there is a folder named crash reports. Open that up and post the full crash log here  (in a spoiler ofc)

 

EDIT: Dont use packet pipeline. Use simple network wrapper

http://www.minecraftforge.net/forum/index.php/topic,20135.0.html

 

EVEN MORE EDIT: In your living fall event only do the changes on server side. Then send a packet to the client to inform it about the changes. Every change should only be made on server side

 

I Heard you like Edits?: Are you calling PacketPipeline.registerPackets?

Posted

No crash report is being generated as neither the server, or the client actually crash. It's only booting me from the server back to the server selection screen.. to which I can click connect again and do it all over again.

 

Packet Pipeline is a bad name. It actually houses a simple network wrapper instance, I'm not using Netty. Perhaps PacketDispatcher or something would have been a more appropriate name.

 

By server side only, should I only be checking for isRemote / just handling singleplayer and multiplayer separately then?

 

Yes, it's being called in the PreInitializationEvent in the Main class file.

 

 

 

         public static void PreLoad(FMLPreInitializationEvent PreEvent)
{

	SPCreativeTabs.initialiseTabs();

	SPBlocks.mainRegistry();

	SPItems.mainRegistry();

	SPTools.mainRegistry();

	SPArmors.mainRegistry();

	CraftingManager.mainRegistry();

	SPWorldGen.mainRegistry();

	FMLCommonHandler.instance().bus().register(new AchievementHandler());

	SPAchievements.mainRegistry();

	FMLCommonHandler.instance().bus().register(new AchievementHandler());
	MinecraftForge.EVENT_BUS.register(new ExtendedPlayerStatsHandler());
	MinecraftForge.EVENT_BUS.register(new CoreDrillHandler());
	MinecraftForge.EVENT_BUS.register(new SpiralDrillBreakHandler());
	MinecraftForge.EVENT_BUS.register(new LivingFallEvent());

	PacketPipeline.registerPackets();

	proxyServer.registerRenderInfo();
}

 

 

Developing the Spiral Power Mod .

こんにちは!お元気ですか?

Posted

Sorry u missunderstood me. What I meant is u dont need ur packet pipeline class, since u can just throw that snw in ur main mod file and call the methods just on him.

U dont need to handle singleplayer and multiplayer separately. Even if you are in singleplayer there will be a server running in the background.

Not quite sure what the error is right now hm

Posted

Ah, I see what you meant after checking the link you posted. Is there any real difference for doing in the main file versus in it's own class? I've been trying to keep the main file as clean as possible.

 

There is an internal server but isn't the difference between EntityPlayer and EntityPlayerMP still there? Or am I perhaps checking the fall itself incorrectly? As of right now if I don't check to see if it's an instance of EntityPlayer I get errors with bats... I may be going about checking the fall damage wrong?

Developing the Spiral Power Mod .

こんにちは!お元気ですか?

Posted

!

I completely forgot about the FML log!

It definitely has the problem in it.. but I don't quite understand it... it seems I've messed up the packet somehow, it seems to be of type PlayClient and is trying to cast to PlayServer.

 

Error in log:

 

 

[07:29:42] [Client thread/ERROR] [FML/]: SimpleChannelHandlerWrapper exception
java.lang.ClassCastException: net.minecraft.client.network.NetHandlerPlayClient cannot be cast to net.minecraft.network.NetHandlerPlayServer
at cpw.mods.fml.common.network.simpleimpl.MessageContext.getServerHandler(MessageContext.java:36) ~[MessageContext.class:?]
at com.Rohzek.spiralpowermod.ServerProxy.getPlayerEntity(ServerProxy.java:22) ~[serverProxy.class:?]
at com.Rohzek.network.AbstractPacket.onMessage(AbstractPacket.java:111) ~[AbstractPacket.class:?]
at com.Rohzek.network.AbstractPacket$AbstractClientPacket.onMessage(AbstractPacket.java:119) ~[AbstractPacket$AbstractClientPacket.class:?]
at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:37) ~[simpleChannelHandlerWrapper.class:?]
at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:17) ~[simpleChannelHandlerWrapper.class:?]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[simpleChannelInboundHandler.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:101) [simpleChannelInboundHandler.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [MessageToMessageDecoder.class:?]
at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?]
at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?]
at cpw.mods.fml.common.network.internal.FMLProxyPacket.func_148833_a(FMLProxyPacket.java:77) [FMLProxyPacket.class:?]
at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:212) [ej.class:?]
at net.minecraft.client.multiplayer.PlayerControllerMP.func_78765_e(PlayerControllerMP.java:273) [bje.class:?]
at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1602) [bao.class:?]
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:973) [bao.class:?]
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:898) [bao.class:?]
at net.minecraft.client.main.Main.main(SourceFile:148) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_45]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
[07:29:42] [Client thread/ERROR] [FML/]: There was a critical exception handling a packet on channel spiralpowermod
java.lang.ClassCastException: net.minecraft.client.network.NetHandlerPlayClient cannot be cast to net.minecraft.network.NetHandlerPlayServer
at cpw.mods.fml.common.network.simpleimpl.MessageContext.getServerHandler(MessageContext.java:36) ~[MessageContext.class:?]
at com.Rohzek.spiralpowermod.ServerProxy.getPlayerEntity(ServerProxy.java:22) ~[serverProxy.class:?]
at com.Rohzek.network.AbstractPacket.onMessage(AbstractPacket.java:111) ~[AbstractPacket.class:?]
at com.Rohzek.network.AbstractPacket$AbstractClientPacket.onMessage(AbstractPacket.java:119) ~[AbstractPacket$AbstractClientPacket.class:?]
at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:37) ~[simpleChannelHandlerWrapper.class:?]
at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:17) ~[simpleChannelHandlerWrapper.class:?]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[simpleChannelInboundHandler.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:101) ~[simpleChannelInboundHandler.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[MessageToMessageDecoder.class:?]
at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?]
at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:?]
at cpw.mods.fml.common.network.internal.FMLProxyPacket.func_148833_a(FMLProxyPacket.java:77) [FMLProxyPacket.class:?]
at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:212) [ej.class:?]
at net.minecraft.client.multiplayer.PlayerControllerMP.func_78765_e(PlayerControllerMP.java:273) [bje.class:?]
at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1602) [bao.class:?]
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:973) [bao.class:?]
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:898) [bao.class:?]
at net.minecraft.client.main.Main.main(SourceFile:148) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_45]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
[07:29:42] [Client thread/DEBUG] [FML/]: Reverting to frozen data state.

 

 

Developing the Spiral Power Mod .

こんにちは!お元気ですか?

Posted

That it does.. but I don't understand why? Packets seem to be quite a bit above me. The two lines it refers to of mine in the error is 111 and 119..

 

119 is a definition of AbstractClientPacket which seems to be sending to client from server as I understand the comments on the tutorial I got it from...

111 is a call to process() which needs a side specified... which it gets from MessageContext... I'm not sure how it gets that...

The message itself is sent with sendTo which is sent from server to client right?

 

I'm not sure where things got flipped.

Developing the Spiral Power Mod .

こんにちは!お元気ですか?

Posted

 

 

/**
   * Returns a side-appropriate EntityPlayer for use during message handling
  */
public EntityPlayer getPlayerEntity(MessageContext ctx) 
{
return ctx.getServerHandler().playerEntity;
}

 

 

Developing the Spiral Power Mod .

こんにちは!お元気ですか?

Posted

I...

Feel so stupid right now.

 

I thought about it for a minute after posting and realized "Shouldn't that be somewhere else too?"

 

I checked in the client proxy and found this:

 

 

@Override
public EntityPlayer getPlayerEntity(MessageContext ctx)
{
return (ctx.side.isClient() ? mc.thePlayer : super.getPlayerEntity(ctx));
}

 

 

 

somehow commented out. Uncommenting it makes it work... sorta...

 

 

 

VDgwysR.png

 

 

 

 

EDIT: Not working as intended exactly... NOW the packet gets sent but only one random player on the server gets their mana drawn from... It's not working individually...

Developing the Spiral Power Mod .

こんにちは!お元気ですか?

Posted

Everytime a change happens to the mana amount it runs the sync() function, which has the packet send if it's on a server.

 

https://github.com/Rohzek/SpiralPowerMod/blob/master/main/java/com/Rohzek/player/SPExtendedPlayerStats.java

 

 

 

When I started the server and joined by myself... It worked as intended, figured out by adding a println statement into the livingfallevent and sync functions

[11:06:39] [server thread/INFO] [sTDOUT/]: [com.Rohzek.player.SPExtendedPlayerStats:sync:157]: Sending packet: Player.NBT to EntityPlayerMP['Rohzek'/316, l='SpiralTEST', x=5.33, y=64.00, z=339.56]
[11:06:39] [server thread/INFO] [sTDOUT/]: [com.Rohzek.handlers.LivingFallEvent:fallingEvent:36]: EntityPlayerMP['Rohzek'/316, l='SpiralTEST', x=5.33, y=64.00, z=339.56] has 46 mana left
[11:06:50] [server thread/INFO] [sTDOUT/]: [com.Rohzek.player.SPExtendedPlayerStats:sync:157]: Sending packet: Player.NBT to EntityPlayerMP['Rohzek'/316, l='SpiralTEST', x=5.38, y=74.00, z=344.98]

Then he joins and tries and again it works as intended:

[11:09:14] [server thread/INFO] [sTDOUT/]: [com.Rohzek.player.SPExtendedPlayerStats:sync:157]: Sending packet: Player.NBT to EntityPlayerMP['Ad_the_Red'/6989, l='SpiralTEST', x=-2.22, y=64.00, z=344.01]
[11:09:14] [server thread/INFO] [sTDOUT/]: [com.Rohzek.handlers.LivingFallEvent:fallingEvent:36]: EntityPlayerMP['Ad_the_Red'/6989, l='SpiralTEST', x=-2.22, y=64.00, z=344.01] has 46 mana left
[11:09:26] [server thread/INFO] [sTDOUT/]: [com.Rohzek.player.SPExtendedPlayerStats:sync:157]: Sending packet: Player.NBT to EntityPlayerMP['Ad_the_Red'/6989, l='SpiralTEST', x=-0.83, y=64.00, z=339.95]

And then the next time I try... it detects my falling damage as intended... but it draws/syncs from his NBT

[11:09:48] [server thread/INFO] [sTDOUT/]: [com.Rohzek.player.SPExtendedPlayerStats:sync:157]: Sending packet: Player.NBT to EntityPlayerMP['Ad_the_Red'/6989, l='SpiralTEST', x=9.14, y=64.00, z=334.32]
[11:09:48] [server thread/INFO] [sTDOUT/]: [com.Rohzek.handlers.LivingFallEvent:fallingEvent:36]: EntityPlayerMP['Rohzek'/316, l='SpiralTEST', x=-0.22, y=64.00, z=343.33] has 46 mana left
[11:09:56] [server thread/INFO] [sTDOUT/]: [com.Rohzek.player.SPExtendedPlayerStats:sync:157]: Sending packet: Player.NBT to EntityPlayerMP['Ad_the_Red'/6989, l='SpiralTEST', x=8.74, y=65.25, z=349.13]

 

 

Developing the Spiral Power Mod .

こんにちは!お元気ですか?

Posted

I will try to pretend that didn't come off as quite rude... Yes I know what static does/is, it was the first thing we learned in the first class in uni. Something slightly more useful would be helpful.. Like "There is only one instance of that class in the game, not one per person" That might actually explain something.

Developing the Spiral Power Mod .

こんにちは!お元気ですか?

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.