More Minecarts and Rails

More Minecarts and Rails

7M Downloads

Cart Loaders: Inventory wipe on reload

simibubi opened this issue ยท 2 comments

commented

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!

commented

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.

commented

Thanks for addressing it,
the new version will be much appreciated