diff options
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r-- | src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_CraftingInput_ME.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_CraftingInput_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_CraftingInput_ME.java index e3c8b86461..ab8271e8fe 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_CraftingInput_ME.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_CraftingInput_ME.java @@ -146,15 +146,11 @@ public class GT_MetaTileEntity_Hatch_CraftingInput_ME extends GT_MetaTileEntity_ } private boolean isEmpty() { - if (itemInventory.isEmpty() && fluidInventory.isEmpty()) return true; + // if one item / fluid is empty then it should be safe to assume all other is empty, + // or at least won't require a recipe check, as long as the pattern is sane + if (!itemInventory.isEmpty()) return itemInventory.get(0) == null || itemInventory.get(0).stackSize <= 0; - for (ItemStack itemStack : itemInventory) { - if (itemStack != null && itemStack.stackSize > 0) return false; - } - - for (FluidStack fluidStack : fluidInventory) { - if (fluidStack != null && fluidStack.amount > 0) return false; - } + if (!fluidInventory.isEmpty()) return fluidInventory.get(0) == null || fluidInventory.get(0).amount <= 0; return true; } |