diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java index 295be905f..da42cb995 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java @@ -216,7 +216,9 @@ public abstract class BlockContainerBase extends BlockContainer implements ItemB if(tile instanceof TileEntityBase){ TileEntityBase base = (TileEntityBase)tile; NBTTagCompound compound = stack.getTagCompound().getCompoundTag("Data"); - base.readSyncableNBT(compound, TileEntityBase.NBTType.SAVE_BLOCK); + if(compound != null){ + base.readSyncableNBT(compound, TileEntityBase.NBTType.SAVE_BLOCK); + } } } } 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 023a6817a..9233e3ceb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java @@ -64,7 +64,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); }