Fix issue with double checking slots for fitting stacks in simulate mode

This commit is contained in:
Chicken-Bomes committed 2014-05-01 00:24:23 +10:00
1 parent 66fd8ad103
commit 47d7c667de
1 file changed
+3 -1
@@ -193,6 +193,8 @@ public class InventoryUtils
for (int pass = 0; pass < 2; pass++) {
for (int slot : inv.slots) {
ItemStack base = inv.inv.getStackInSlot(slot);
if((pass == 0) == (base == null))
continue;
int fit = fitStackInSlot(inv, slot, stack);
if (fit == 0)
continue;
@@ -203,7 +205,7 @@ public class InventoryUtils
base.stackSize += fit;
inv.inv.setInventorySlotContents(slot, base);
}
} else if (pass == 1) {
} else {
if (!simulate)
inv.inv.setInventorySlotContents(slot, copyStack(stack, fit));
stack.stackSize -= fit;