Fix the fermenting barrel crashing with a missing compound when placing sometimes

Actually fixes #437
This commit is contained in:
Ellpeck 2016-12-03 12:31:17 +01:00
parent fc4484cc73
commit 14c776df1b

View file

@ -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);
}