aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2022-09-13 00:27:37 +1000
committerGitHub <noreply@github.com>2022-09-12 16:27:37 +0200
commit7fb629f0fc0d6e2455418f85c36a11667f888d42 (patch)
tree98b38d9ab876bb27a89360f1d74ea93241151d38
parent996b42013330944403684b4a127015e5b04c6295 (diff)
downloadNotEnoughUpdates-7fb629f0fc0d6e2455418f85c36a11667f888d42.tar.gz
NotEnoughUpdates-7fb629f0fc0d6e2455418f85c36a11667f888d42.tar.bz2
NotEnoughUpdates-7fb629f0fc0d6e2455418f85c36a11667f888d42.zip
Fixed clicking outside of experimentation game causing it to go count that as a valid click (#269)
-rw-r--r--Update Notes/2.1.md1
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java7
2 files changed, 5 insertions, 3 deletions
diff --git a/Update Notes/2.1.md b/Update Notes/2.1.md
index fa49a1d0..6080e656 100644
--- a/Update Notes/2.1.md
+++ b/Update Notes/2.1.md
@@ -149,6 +149,7 @@
- Fixed shortened damage - nopo
- Fixed bazaar prices sorting order in neu item list - hannibal2
- Fixed priceless items showing first in the missing tab of the accessory bag overlay - nopo
+- Fixed clicking outside of experimentation game causing it to go count that as a valid click - nopo
- Fixed storage gui when having locked backpack slots - nopo
### **Other:**
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java
index 558917fe..a1580d8e 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java
@@ -342,8 +342,9 @@ public class EnchantingSolvers {
if (chronomatronReplayIndex < chronomatronOrder.size()) {
String chronomatronCurrent = chronomatronOrder.get(chronomatronReplayIndex);
- if (!NotEnoughUpdates.INSTANCE.config.enchantingSolvers.preventMisclicks1 ||
- chronomatronCurrent.equals(displayName) || Keyboard.getEventKey() == Keyboard.KEY_LSHIFT) {
+ if ((!NotEnoughUpdates.INSTANCE.config.enchantingSolvers.preventMisclicks1 ||
+ chronomatronCurrent.equals(displayName) || Keyboard.getEventKey() == Keyboard.KEY_LSHIFT) &&
+ stack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane) && slotId != 4 && slotId != 49) {
chronomatronReplayIndex++;
Minecraft.getMinecraft().playerController.windowClick(windowId, slotId,
2, mode, Minecraft.getMinecraft().thePlayer
@@ -374,7 +375,7 @@ public class EnchantingSolvers {
long currentTime = System.currentTimeMillis();
if (currentTime - millisLastClick > 150 &&
(!NotEnoughUpdates.INSTANCE.config.enchantingSolvers.preventMisclicks1 ||
- current.containerIndex == slotId || Keyboard.getEventKey() == Keyboard.KEY_LSHIFT)) {
+ current.containerIndex == slotId || Keyboard.getEventKey() == Keyboard.KEY_LSHIFT) && (slotId < 45 && slotId > 8)) {
ultrasequencerReplayIndex++;
Minecraft.getMinecraft().playerController.windowClick(windowId, slotId,
2, mode, Minecraft.getMinecraft().thePlayer