diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java index fe8c22c7..79d364c9 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java @@ -602,7 +602,20 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B protected ItemStack[] getAllInputs() { ItemStack[] rInputs = new ItemStack[mInputSlotCount]; - for (int i = 0; i < mInputSlotCount; i++) rInputs[i] = getInputAt(i); + int emptySlotLocation = -1; + for (int i = 0; i < mInputSlotCount; i++){ + ItemStack currentInput = getInputAt(i); + if (emptySlotLocation == -1) { + if (currentInput == null) { + emptySlotLocation = i; + continue; + } + } + rInputs[i] = currentInput; + } + if (emptySlotLocation != -1) { + rInputs[emptySlotLocation] = GT_Utility.getIntegratedCircuit(0); + } return rInputs; }