mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-20 03:59:37 +00:00
[#2210] fix for NPE on placing an empty gas-burning generator
This commit is contained in:
1 parent
7cfc0c5c3f
commit
2a1fe5b3e9
1 file changed
+2
-1
@@ -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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user