From 5b702e9d1551b5cd2ef09fda16f98e676d38f381 Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Mon, 6 Feb 2023 14:33:16 +0000 Subject: Fixed pickaxe cooldown not working on mining overlay when you have the durability bar disabled (#595) --- .../moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java | 9 +++++---- 1 file changed, 5 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 5651a6ed..2253ca4a 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java @@ -182,8 +182,7 @@ public class ItemCooldowns { @SubscribeEvent public void onChatMessage(ClientChatReceivedEvent event) { - if (PICKAXE_ABILITY_ACTIVATION.matcher(event.message.getFormattedText()).matches() && - NotEnoughUpdates.INSTANCE.config.itemOverlays.pickaxeAbility && pickaxeCooldown != 0) { + if (PICKAXE_ABILITY_ACTIVATION.matcher(event.message.getFormattedText()).matches() && pickaxeCooldown != 0) { findCooldownInTooltip(Item.PICKAXES); pickaxeUseCooldownMillisRemaining = pickaxeCooldown * 1000; } @@ -260,10 +259,12 @@ public class ItemCooldowns { } // Pickaxes - if (isPickaxe(internalname) && NotEnoughUpdates.INSTANCE.config.itemOverlays.pickaxeAbility) { + if (isPickaxe(internalname)) { findCooldownInTooltip(Item.PICKAXES); - return durabilityOverride(pickaxeUseCooldownMillisRemaining, pickaxeCooldown, stack); + if (NotEnoughUpdates.INSTANCE.config.itemOverlays.pickaxeAbility) { + return durabilityOverride(pickaxeUseCooldownMillisRemaining, pickaxeCooldown, stack); + } else return -1; } // Treecapitator / Jungle Axe if (internalname.equals("TREECAPITATOR_AXE") || internalname.equals("JUNGLE_AXE")) { -- cgit