Jump to content

[1.12.2] Problem when opening a Container of a TileEntity


Recommended Posts



I have a problem on my code : When i want to open the inventory of my machine, my game crash and here is what the crash report says :



It seems that the slots on my container is crashing my game. Here's my container code :



In case of here are the slots i'm using :




I'm using forge 1.12.2- ~ Latest

Thank you for reading,

Have a nice day

Edited by Riss_Crew
Link to comment
Share on other sites

I replaced all my IInventory by IItemhandler
But the error look like the same as before a null slot: https://pastebin.com/bdgUteFt

But in my TileEntityClass, my inventory stack look like this :

private NonNullList<ItemStack> machineItemStacks = NonNullList.withSize(4, ItemStack.EMPTY);

And i have only 4 slots :

this.addSlotToContainer(new SlotItemHandler(tileentity, 0, 14, 8));
this.addSlotToContainer(new SlotItemHandler(tileentity, 1, 51, 8));
this.addSlotToContainer(new SlotEnergyFuel(tileentity, 2, 14, 56));
this.addSlotToContainer(new SlotMachineOutput(player.player, tileentity, 3, 114, 7));

So all slots are fill with ItemStack.Empty and are not null no ?

Link to comment
Share on other sites

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.

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.


  • Create New...

Important Information

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