Merge pull request #147 from Chicken-Bones/master
Old world tank compatibility.
This commit is contained in:
commit
9d7bc305a8
1 changed files with 12 additions and 3 deletions
|
@ -82,9 +82,18 @@ public class TileTank extends TileBuildCraft implements ITankContainer
|
||||||
public void readFromNBT(NBTTagCompound data)
|
public void readFromNBT(NBTTagCompound data)
|
||||||
{
|
{
|
||||||
super.readFromNBT(data);
|
super.readFromNBT(data);
|
||||||
LiquidStack liquid = new LiquidStack(0, 0, 0);
|
|
||||||
liquid.readFromNBT(data.getCompoundTag("tank"));
|
if(data.hasKey("stored") && data.hasKey("liquidId"))
|
||||||
tank.setLiquid(liquid);
|
{
|
||||||
|
LiquidStack liquid = new LiquidStack(data.getInteger("liquidId"), data.getInteger("stored"), 0);
|
||||||
|
tank.setLiquid(liquid);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LiquidStack liquid = new LiquidStack(0, 0, 0);
|
||||||
|
liquid.readFromNBT(data.getCompoundTag("tank"));
|
||||||
|
tank.setLiquid(liquid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue