mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-12 00:07:33 +00:00
Fix issue with double checking slots for fitting stacks in simulate mode
This commit is contained in:
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;
|
||||
|
||||
Reference in new issue
Block a user