Cart Loaders: Inventory wipe on reload
simibubi opened this issue ยท 2 comments
Hi, excellent mod ๐
I've noticed that cart loaders and -unloaders lose their inventory whenever their chunk is saved and loaded. This makes them difficult to use for reliable automation setups.
In order to fix this, all that's needed is to serialize the items list to the compound tag returned by TileEntity#save
, as well as load it from the compound in TileEntity#load
.
It's quite simple, similar to the chest you can add the lines:
ItemStackHelper.saveAllItems(compound, this.items);
and
ItemStackHelper.loadAllItems(compound, this.items);
respectively. Feel free to ask if you have further questions.
Cheers much!
Oh, wow! I'm a big fan!
Anyhow, thank you for reporting this. Should be fixed with e5af9cf - I'll build and upload a new version within 24 hours.