From c410fce3de477c8fcdfa29aae37eba89d4f5928c Mon Sep 17 00:00:00 2001 From: Technus Date: Wed, 2 Nov 2016 23:38:49 +0100 Subject: [PATCH] Fix diesel bug --- .../generators/GT_MetaTileEntity_DieselGenerator.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java index 2e383ded..7d487520 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java @@ -12,6 +12,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenera import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_DieselGenerator @@ -54,6 +55,7 @@ public class GT_MetaTileEntity_DieselGenerator } public int getFuelValue(ItemStack aStack) { + if (GT_Utility.isStackInvalid(aStack)) return 0; int rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack)); if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) { rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3);