Hopefully fix the Gas Generator issue for good.

This commit is contained in:
Ben Spiers committed 2014-09-24 21:53:25 +01:00
1 parent 63101ade28
commit d31ebf88eb
2 files changed
+8 -2

No files matched your search

+4 -1
View File
@@ -218,7 +218,10 @@ public class GasTank
stored = GasStack.readFromNBT(nbtTags.getCompoundTag("stored"));
}
maxGas = nbtTags.getInteger("maxGas");
if(nbtTags.hasKey("maxGas"))
{
maxGas = nbtTags.getInteger("maxGas");
}
}
/**
@@ -290,6 +290,9 @@ public class TileEntityGasGenerator extends TileEntityGenerator implements IGasH
@Override
public void readSustainedData(ItemStack itemStack)
{
fuelTank.read(itemStack.stackTagCompound.getCompoundTag("fuelTank"));
if(itemStack.stackTagCompound.hasKey("fuelTank"))
{
fuelTank.read(itemStack.stackTagCompound.getCompoundTag("fuelTank"));
}
}
}