From 14c776df1b639128e7c0599e77d7f759667902c3 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 3 Dec 2016 12:31:17 +0100 Subject: [PATCH] Fix the fermenting barrel crashing with a missing compound when placing sometimes Actually fixes #437 --- .../mod/tile/TileEntityFermentingBarrel.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java index 3a2169d5f..e10f9f416 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java @@ -65,7 +65,10 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IShari public void readSyncableNBT(NBTTagCompound compound, NBTType type){ this.currentProcessTime = compound.getInteger("ProcessTime"); this.canolaTank.readFromNBT(compound); - this.oilTank.readFromNBT((NBTTagCompound)compound.getTag("OilTank")); + NBTTagCompound tag = compound.getCompoundTag("OilTank"); + if(tag != null){ + this.oilTank.readFromNBT(tag); + } super.readSyncableNBT(compound, type); }