Fix for a gas-generator with empty tank throwing exception during onChunkLoad (bug #2148)

This commit is contained in:
Brian Lewis committed 2015-02-23 10:14:10 -06:00
1 parent 079ca960ee
commit 8570748ad9
1 file changed
+2 -1
@@ -266,7 +266,8 @@ public class TileEntityGasGenerator extends TileEntityGenerator implements IGasH
fuelTank.read(nbtTags.getCompoundTag("fuelTank"));
FuelGas fuel = FuelHandler.getFuel(fuelTank.getGas().getGas());
boolean isTankEmpty = (fuelTank.getGas() == null);
FuelGas fuel = (isTankEmpty) ? null : FuelHandler.getFuel(fuelTank.getGas().getGas());
if(fuel != null)
{