diff options
| author | Lulonaut <lulonaut@lulonaut.dev> | 2024-05-28 16:09:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-28 16:09:49 +0200 |
| commit | fe1aba56dedeb256353fe2d281dfe986b448909e (patch) | |
| tree | 224fce28d7e658d2dab92ec1dfaaf70bf18f4a71 /src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java | |
| parent | a64f285a122663649fa8bfff4871ed6e22fc964c (diff) | |
| download | notenoughupdates-fe1aba56dedeb256353fe2d281dfe986b448909e.tar.gz notenoughupdates-fe1aba56dedeb256353fe2d281dfe986b448909e.tar.bz2 notenoughupdates-fe1aba56dedeb256353fe2d281dfe986b448909e.zip | |
Fix pet not being updated when selected with number keys (#1180)
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java index c823cf88..9d346638 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java @@ -691,7 +691,12 @@ public class PetInfoOverlay extends TextOverlay { @SubscribeEvent public void onStackClick(SlotClickEvent event) { - if (event.clickedButton != 0 && event.clickedButton != 1 && event.clickedButton != 2) return; + // 0 through 8 are the mouse as well as the keyboard buttons, allow all of those + if (event.clickedButton < 0 || event.clickedButton > 8) return; + // Ignore RMB clicks, which convert the pet to an item + if (event.clickedButton == 1 && event.clickType == 0) return; + // Ignore shift clicks, which don't work + if (event.clickType == 1) return; int slotIdMod = (event.slotId - 10) % 9; if (event.slotId >= 10 && event.slotId <= 43 && slotIdMod >= 0 && slotIdMod <= 6 && |
