We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8f52d9 commit a29b6a7Copy full SHA for a29b6a7
common/src/main/java/dev/terminalmc/clientsort/client/gui/ControlButtonManager.java
@@ -427,9 +427,12 @@ private static void addButton(
427
AbstractContainerScreen<?> screen,
428
boolean isPlayerInv
429
) {
430
+ // TODO find a way to reliably get a slot that belongs to the correct
431
+ // inventory, since the reference slot is used as the scope slot
432
+ // Get the top-most of the right-most slots
433
return screen.getMenu().slots.stream()
434
.filter(slot -> isPlayerInv == (slot.container instanceof Inventory))
- .max(Comparator.comparingInt(slot -> slot.x - slot.y))
435
+ .max(Comparator.comparingInt(slot -> slot.x * 9999 - slot.y))
436
.orElse(null);
437
}
438
0 commit comments