diff options
author | NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> | 2023-02-06 14:33:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-06 15:33:16 +0100 |
commit | 5b702e9d1551b5cd2ef09fda16f98e676d38f381 (patch) | |
tree | e2e9f3393bdce522f969754b366ffb51c5efdb82 /src/main/java/io | |
parent | 2451485b81a2d3c4a4e65a2647a1a698144abe17 (diff) | |
download | NotEnoughUpdates-5b702e9d1551b5cd2ef09fda16f98e676d38f381.tar.gz NotEnoughUpdates-5b702e9d1551b5cd2ef09fda16f98e676d38f381.tar.bz2 NotEnoughUpdates-5b702e9d1551b5cd2ef09fda16f98e676d38f381.zip |
Fixed pickaxe cooldown not working on mining overlay when you have the durability bar disabled (#595)
Diffstat (limited to 'src/main/java/io')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java | 9 |
1 files 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")) { |