Merge pull request #2152 from Dannerick/myDev1
Fix for a gas-generator with empty tank throwing exception (bug #2148)
This commit is contained in:
commit
995c798767
1 changed files with 2 additions and 1 deletions
|
@ -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