I'm trying to make an inventory with five slots, but every time I try to put more than one slot on the Container file for the inventory, the game crashes as soon as I open the inventory. It says that it only has slots [0,1) available in the crash log even though I have the IStackHandler's size parameter set to 5. Am I doing something wrong?
(side note: I kinda have the feeling that my container file could be a little more efficient with all the markDirty(); so if that can be improved
(You can pass null as a facing, by the way. That's what @Nullable means. null is typically used to represent an "internal" or "self" access.)
Did you ever have the inventory size as being only 1? Because if you did, and you saved that world, and you're reloading that world, the deserialization process is reading an inventory of size 1 and overriding your new with size 5.