aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorDoKM <mcazzyman@gmail.com>2021-08-20 14:53:17 +0200
committerDoKM <mcazzyman@gmail.com>2021-08-20 14:53:17 +0200
commit20fd2dc63a7547c341062a20e26b1154a48952c1 (patch)
tree3b4fa25817574dd1182e9092847c365fa3daf36a /src/main/java
parent3837dc59c036b29f24f90eb8e714c675082e3676 (diff)
downloadNotEnoughUpdates-20fd2dc63a7547c341062a20e26b1154a48952c1.tar.gz
NotEnoughUpdates-20fd2dc63a7547c341062a20e26b1154a48952c1.tar.bz2
NotEnoughUpdates-20fd2dc63a7547c341062a20e26b1154a48952c1.zip
Add option to disable pickaxe ability cooldown as pickaxe durability
Diffstat (limited to 'src/main/java')
-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;
+
}