Started by
loressa
on
Topic category: Help with Minecraft modding (Java Edition)
Using Mcreator 2026.1
I made a GUI with no slots, just a PNG background image.
I binded it to an item and had it open on right-click.
The size of inventory was 0
When I right-clicked with the item in hand it crashes the game and I get this error message:
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.inventory.Slot.getItem()" because the return value of "java.util.Map.get(Object)" is null
I also did one for a block and had Enable block entity switched off, and just Bind this block to GUI, open on right-click and Size of inventory (slot count): 0
Also crashed the game.
Let me know if you need to see the code for the GUI or item/block.
Thanks.
Please open a bug report at https://github.com/MCreator/MCreator/issues and attach zip of your workspace and steps to reproduce. Thanks!