mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-06 00:49:09 +01:00
Maybe fix a crash with the fermenting barrel?
This commit is contained in:
parent
52e87f8509
commit
a30f094efa
2 changed files with 7 additions and 2 deletions
|
@ -216,7 +216,9 @@ public abstract class BlockContainerBase extends BlockContainer implements ItemB
|
||||||
if(tile instanceof TileEntityBase){
|
if(tile instanceof TileEntityBase){
|
||||||
TileEntityBase base = (TileEntityBase)tile;
|
TileEntityBase base = (TileEntityBase)tile;
|
||||||
NBTTagCompound compound = stack.getTagCompound().getCompoundTag("Data");
|
NBTTagCompound compound = stack.getTagCompound().getCompoundTag("Data");
|
||||||
base.readSyncableNBT(compound, TileEntityBase.NBTType.SAVE_BLOCK);
|
if(compound != null){
|
||||||
|
base.readSyncableNBT(compound, TileEntityBase.NBTType.SAVE_BLOCK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,10 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IShari
|
||||||
public void readSyncableNBT(NBTTagCompound compound, NBTType type){
|
public void readSyncableNBT(NBTTagCompound compound, NBTType type){
|
||||||
this.currentProcessTime = compound.getInteger("ProcessTime");
|
this.currentProcessTime = compound.getInteger("ProcessTime");
|
||||||
this.canolaTank.readFromNBT(compound);
|
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);
|
super.readSyncableNBT(compound, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue