make the coffee maker store its coffee cache when breaking it

This commit is contained in:
Ellpeck 2017-03-10 23:00:31 +01:00
parent 6e1c4df988
commit 2dbc50f52b

View file

@ -88,8 +88,8 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements
super.writeSyncableNBT(compound, type);
this.storage.writeToNBT(compound);
this.tank.writeToNBT(compound);
if(type != NBTType.SAVE_BLOCK){
compound.setInteger("Cache", this.coffeeCacheAmount);
if(type != NBTType.SAVE_BLOCK){
compound.setInteger("Time", this.brewTime);
}
}
@ -99,8 +99,8 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements
super.readSyncableNBT(compound, type);
this.storage.readFromNBT(compound);
this.tank.readFromNBT(compound);
if(type != NBTType.SAVE_BLOCK){
this.coffeeCacheAmount = compound.getInteger("Cache");
if(type != NBTType.SAVE_BLOCK){
this.brewTime = compound.getInteger("Time");
}
}