From 8935a7c3d22256a98f5d86f2e414e11b888aac93 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 28 Jan 2017 17:44:30 +0100 Subject: [PATCH] Make the coffee maker store its coffee cache on breaking Closes #600 --- .../actuallyadditions/mod/tile/TileEntityCoffeeMachine.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java index 0a4e2800b..64795bf2d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java @@ -88,8 +88,8 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements super.writeSyncableNBT(compound, type); this.storage.writeToNBT(compound); this.tank.writeToNBT(compound); + compound.setInteger("Cache", this.coffeeCacheAmount); if(type != NBTType.SAVE_BLOCK){ - compound.setInteger("Cache", this.coffeeCacheAmount); 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); + this.coffeeCacheAmount = compound.getInteger("Cache"); if(type != NBTType.SAVE_BLOCK){ - this.coffeeCacheAmount = compound.getInteger("Cache"); this.brewTime = compound.getInteger("Time"); } }