aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/ItemOverlays.java9
2 files changed, 11 insertions, 2 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 59b3d802..053910bc 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java
@@ -124,7 +124,7 @@ public class ItemCooldowns {
}
private static void updatePickaxeCooldown() {
- if(pickaxeCooldown == -1) {
+ if(pickaxeCooldown == -1 && NotEnoughUpdates.INSTANCE.config.itemOverlays.pickaxeAbility) {
for(ItemStack stack : Minecraft.getMinecraft().thePlayer.inventory.mainInventory) {
if(stack != null && stack.hasTagCompound()) {
String internalname = NotEnoughUpdates.INSTANCE.manager.getInternalNameForItem(stack);
@@ -148,7 +148,7 @@ public class ItemCooldowns {
@SubscribeEvent
public void onChatMessage(ClientChatReceivedEvent event) {
- if(pickaxeCooldown != 0 && PICKAXE_ABILITY_REGEX.matcher(event.message.getFormattedText()).matches()) {
+ if(pickaxeCooldown != 0 && PICKAXE_ABILITY_REGEX.matcher(event.message.getFormattedText()).matches() && NotEnoughUpdates.INSTANCE.config.itemOverlays.pickaxeAbility) {
updatePickaxeCooldown();
pickaxeUseCooldownMillisRemaining = pickaxeCooldown*1000;
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/ItemOverlays.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/ItemOverlays.java
index af236bf8..86256650 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/ItemOverlays.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/ItemOverlays.java
@@ -303,4 +303,13 @@ public class ItemOverlays {
@ConfigEditorBoolean
public boolean enablePrismapumpOverlay = true;
+
+ @Expose
+ @ConfigOption(
+ name = "Pickaxe Ability Cooldown",
+ desc = "Show the cooldown duration off the pickaxe ability as the durability."
+ )
+ @ConfigEditorBoolean
+ public boolean pickaxeAbility = true;
+
}