Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/main/java/yalter/mousetweaks/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,11 @@ private static void handleWheel(Slot selectedSlot) {
return;
}

int attemptsLeft = 100;

do {
attemptsLeft--;

Slot applicableSlot = findWheelApplicableSlot(slots, selectedSlot, pushItems);
if (applicableSlot == null)
break;
Expand Down Expand Up @@ -320,7 +324,7 @@ private static void handleWheel(Slot selectedSlot) {
handler.clickSlot(slotFrom, MouseButton.LEFT, false);
}
}
} while (numItemsToMove > 0);
} while (numItemsToMove > 0 && attemptsLeft > 0);
}

// Returns true if the other inventory is above the selected slot inventory.
Expand Down