Fixed potential NPE in TileTank
This commit is contained in:
parent
093d5229e2
commit
94bb9bf0e8
1 changed files with 2 additions and 1 deletions
|
@ -91,7 +91,8 @@ public class TileTank extends TileBuildCraft implements ITankContainer
|
|||
public void writeToNBT(NBTTagCompound data)
|
||||
{
|
||||
super.writeToNBT(data);
|
||||
data.setTag("tank", tank.getLiquid().writeToNBT(new NBTTagCompound()));
|
||||
if(tank.getLiquid() != null)
|
||||
data.setTag("tank", tank.getLiquid().writeToNBT(new NBTTagCompound()));
|
||||
}
|
||||
|
||||
/* HELPER FUNCTIONS */
|
||||
|
|
Loading…
Reference in a new issue