aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2022-09-23 01:56:53 +1000
committerGitHub <noreply@github.com>2022-09-22 17:56:53 +0200
commit5b3d6154a53599d37aa9c98e89b942f70fbce2cb (patch)
tree0e69608186bfc1b3956c304b7f169b0e72980222 /src
parent6520c42697fe929316e93e42e8b070e6241cff0e (diff)
downloadNotEnoughUpdates-5b3d6154a53599d37aa9c98e89b942f70fbce2cb.tar.gz
NotEnoughUpdates-5b3d6154a53599d37aa9c98e89b942f70fbce2cb.tar.bz2
NotEnoughUpdates-5b3d6154a53599d37aa9c98e89b942f70fbce2cb.zip
fix pet middle clicking (#287)
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
index 308bd63e..dbff2be2 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
@@ -753,7 +753,9 @@ public class NEUOverlay extends Gui {
if (slot != null) {
ItemStack hover = slot.getStack();
if (hover != null) {
- textField.setText("id:" + manager.getInternalNameForItem(hover));
+ if (manager.getInternalNameForItem(hover) != null) {
+ textField.setText("id:" + manager.getInternalNameForItem(hover));
+ }
itemPaneOpen = true;
updateSearch();
}
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 761c0695..14a136a2 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java
@@ -859,8 +859,7 @@ public class PetInfoOverlay extends TextOverlay {
);
public static void onStackClick(ItemStack stack, int windowId, int slotId, int mouseButtonClicked, int mode) {
- if (mode != 0) return;
- if (mouseButtonClicked != 0 && mouseButtonClicked != 1) return;
+ if (mouseButtonClicked != 0 && mouseButtonClicked != 1 && mouseButtonClicked != 2) return;
int slotIdMod = (slotId - 10) % 9;
if (slotId >= 10 && slotId <= 43 && slotIdMod >= 0 && slotIdMod <= 6 &&