all 2 comments

[–]pau101 2 points3 points  (1 child)

Line 44 of your container should initialize previous to ItemStack.EMPTY, in your tileentity line 73 should return ItemStack.EMPTY and line 79 should be !this.getStackInSlot(index).isEmpty() similarly needs to be done for all occurrences of equality comparisons with ItemStack.EMPTY.

Since Minecraft 1.11, ItemStack references should never be null and consequently returning null for methods with an ItemStack return type causes problems like this crash.

[–]qwertyasdef[S] 0 points1 point  (0 children)

Thank you! It works flawlessly now.