From 41d1093d34599a903df4b4cbbd76067dc7e6ce9e Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Mon, 31 Oct 2022 10:23:53 +0000 Subject: Fix picknimbus not working for ability cooldown (#398) * add PICKONIMBUS to pickaxe * fixed yelling at you * unsure why it was like that * Chatting * Watching --- .../github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java | 4 +--- .../github/moulberry/notenoughupdates/mixins/MixinGuiTextField.java | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java index f68f3c58..4fc63734 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java @@ -150,9 +150,7 @@ public class ItemCooldowns { } else if (internalname.contains("_DRILL_")) { char lastChar = internalname.charAt(internalname.length() - 1); return lastChar >= '0' && lastChar <= '9'; - } else if (internalname.equals("DIVAN_DRILL")) { - return true; - } else return internalname.equals("GEMSTONE_GAUNTLET"); + } else return internalname.equals("GEMSTONE_GAUNTLET") || internalname.equals("PICKONIMBUS") || internalname.equals("DIVAN_DRILL"); } private static void updatePickaxeCooldown() { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiTextField.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiTextField.java index 55a5a098..039256e5 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiTextField.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiTextField.java @@ -80,7 +80,7 @@ public abstract class MixinGuiTextField { } } - @Inject(method = "deleteFromCursor", at = @At(value = "INVOKE", target = "Lcom/google/common/base/Predicate;apply(Ljava/lang/Object;)Z"), locals = LocalCapture.PRINT) + @Inject(method = "deleteFromCursor", at = @At(value = "INVOKE", target = "Lcom/google/common/base/Predicate;apply(Ljava/lang/Object;)Z", remap = false), locals = LocalCapture.CAPTURE_FAILSOFT) public void deleteFromCursor_stringStack(int i, CallbackInfo ci, boolean bl, int j, int k, String string) { if (NotEnoughUpdates.INSTANCE.config.misc.textFieldTweaksEnabled) { addToStack(string); -- cgit