Merge pull request #2211 from Dannerick/myDev1
[#2210] fix for NPE on placing an empty gas-burning generator
This commit is contained in:
commit
9a704f2812
1 changed files with 2 additions and 1 deletions
|
@ -323,8 +323,9 @@ public class TileEntityGasGenerator extends TileEntityGenerator implements IGasH
|
|||
{
|
||||
fuelTank.read(itemStack.stackTagCompound.getCompoundTag("fuelTank"));
|
||||
|
||||
boolean isTankEmpty = (fuelTank.getGas() == null);
|
||||
//Update energy output based on any existing fuel in tank
|
||||
FuelGas fuel = FuelHandler.getFuel(fuelTank.getGas().getGas());
|
||||
FuelGas fuel = (isTankEmpty) ? null : FuelHandler.getFuel(fuelTank.getGas().getGas());
|
||||
|
||||
if(fuel != null)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue