Hopefully fix the Gas Generator issue for good.

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

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");
}
}
/**

View file

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