Hi, I've been struggling this for a while and can't seem to get it to work so was wondering if anybody here would know how to fix my problem.
Basically I've got a TileEntity with an inventory, and it can store items through NBT just fine. It has a TileEntitySpecialRenderer which will render the item in inventory slot 0 if it isn't null. The item will get rendered when you first place it into the inventory, but upon re-loading the world the item isn't rendering. I know for certain that the inventory is being saved, because if I break the block then the items come out. For some reason the slot is null in renderTileEntityAt, but when I break the block the item comes out? I'm not sure what the problem could be, so any help would be appreciated. I'm thinking maybe it's something to do with differences between client and server maybe?
Here's the Renderer function (the rest of the class is empty):
The
System.out.println(te.getStackInSlot(0))
is returning null when I first place the entity (which is to be expected since the inventory SHOULD be empty), returning the item in slot 0 correctly when I first place it, but returning null again upon reloading the world.
If you need any more information