Started by
Lofty
on
Topic category: Help with Minecraft modding (Java Edition)
Hello friends,
I created an item with a GUI.
The GUI sets an NBT text tag for the item.
In single player this works fine with no issues.
In multiplayer, the instant you craft the item (or select it from creative menu) the client immediately crashes with the following message:
Internal Exception: io.netty.handler.codec.DecoderException:
java.lang.NullPointerException: Cannot invoke "net.minecraft.nbt.CompoundTag.contains(String, int)" because "nbt" is null
Singleplayer:
Multiplayer:
Any help or advice would be appreciated.
reason of this is that the text it gets is well. an NULL text input
the in game crash report isn't enough
and would be better if an image of the procedures used is provided
but i guess is that you tried to get the nbt text with it being . NULL (basically empty)
so i recommend using the trigger when item on inventory tick add an
IF (LOGIC NBT) = false
set (TEXT NBT) TO "Placeholder (anything that isn't a blank space)"
set (LOGIC NBT) TO true
Unbinding the GUI in item properties fixed this issue.
I set the right click triggers (block and entity) to open the GUI instead.