Skip to content

Commit

Permalink
🐛 Fix: Distinguish slots and raw slots.
Browse files Browse the repository at this point in the history
authored by LoliColleen
  • Loading branch information
hanbings committed Dec 15, 2023
1 parent 45128b0 commit 8dbf9e4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public Inventory inventory() {
// item click callback
int rawSlot = (event.getRawSlot());
registries.forEach(registry -> {
if (!(rawSlot == registry.slot + 36)) return;
if (!(rawSlot == registry.slot)) return;

// click
if (registry.action.click != null)
Expand All @@ -214,7 +214,7 @@ public Inventory inventory() {
// item drag callback
int rawSlot = (event.getRawSlots().stream().findFirst().orElse(-1));
registries.forEach(registry -> {
if (!(rawSlot == registry.slot + 36)) return;
if (!(rawSlot == registry.slot)) return;

// drag
if (registry.action.drag != null)
Expand Down

0 comments on commit 8dbf9e4

Please sign in to comment.