Skip to content

Commit

Permalink
Merge remote-tracking branch 'Nilau1998/FixCraftingStations' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Dream-Master committed Nov 1, 2023
2 parents 3f9b327 + a6b2a87 commit 34af627
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@ private void moveIngredients(GuiContainer gui, List<IngredientDistribution> assi
if (!slot.getHasStack() || !canMoveFrom(slot, gui)) continue;

ItemStack stack = slot.getStack();
int backupStackSize = stack.stackSize; // clickSlot can kill the reference
if (!canStack(stack, pstack)) continue;

FastTransferManager.clickSlot(gui, slot.slotNumber);
int amount = Math.min(transferCap - transferred, stack.stackSize);
int amount = Math.min(transferCap - transferred, backupStackSize);
for (int c = 0; c < amount; c++) {
FastTransferManager.clickSlot(gui, dest.slotNumber, 1);
transferred++;
Expand Down

0 comments on commit 34af627

Please sign in to comment.