Fix for a gas-generator with empty tank throwing exception during onChunkLoad (bug #2148)
This commit is contained in:
parent
079ca960ee
commit
8570748ad9
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue