Made it so that empty slots are treated as Integ. Circ. with config 0

This commit is contained in:
Johannes Gäßler 2017-08-01 09:01:03 +02:00
parent ff35ae8d91
commit dc31c9ebdb

View file

@ -602,7 +602,20 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
protected ItemStack[] getAllInputs() { protected ItemStack[] getAllInputs() {
ItemStack[] rInputs = new ItemStack[mInputSlotCount]; 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; return rInputs;
} }