#520 Alloy Smelter upgrade breaks ME interface 'blocking mode'

This commit is contained in:
CrazyPants committed 2014-03-03 18:13:29 +08:00
1 parent 8b6095fd5d
commit bbff9ff60f
2 files changed
+11 -3

No files matched your search

@@ -19,9 +19,13 @@ public abstract class AbstractPoweredTaskEntity extends AbstractMachineEntity im
@Override
public int[] getAccessibleSlotsFromSide(int var1) {
int[] res = new int[inventory.length];
for (int i = 0; i < res.length; i++) {
res[i] = i;
int[] res = new int[inventory.length - slotDefinition.getNumUpgradeSlots()];
int index = 0;
for (int i = 0; i < inventory.length; i++) {
if(!slotDefinition.isUpgradeSlot(i)) {
res[index] = i;
index++;
}
}
return res;
}
@@ -41,6 +41,10 @@ public class SlotDefinition {
return slot >= minOutputSlot && slot <= maxOutputSlot;
}
public int getNumUpgradeSlots() {
return Math.max(0, maxUpgradeSlot - minUpgradeSlot + 1);
}
public int getNumInputSlots() {
return Math.max(0, maxInputSlot - minInputSlot + 1);
}