From 5887750976da10ebe7a2f2f509d7921d3f8b2c87 Mon Sep 17 00:00:00 2001 From: ImaMapleTree <59880284+ImaMapleTree@users.noreply.github.com> Date: Tue, 7 Apr 2026 11:50:26 +0900 Subject: [PATCH] Prevent tinkerer's glove from applying when initial mining speed is zero (#269) Co-authored-by: LazyFleshWasTaken <40587985+LazyFleshWasTaken@users.noreply.github.com> --- src/main/java/tconstruct/armor/TinkerArmorEvents.java | 5 ++++- src/main/java/tconstruct/util/config/PHConstruct.java | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/tconstruct/armor/TinkerArmorEvents.java b/src/main/java/tconstruct/armor/TinkerArmorEvents.java index a6c5d7ba..7722e78a 100644 --- a/src/main/java/tconstruct/armor/TinkerArmorEvents.java +++ b/src/main/java/tconstruct/armor/TinkerArmorEvents.java @@ -90,7 +90,10 @@ public class TinkerArmorEvents { if (ArmorProxyClient.armorExtended != null) glove = ArmorProxyClient.armorExtended.getStackInSlot(1); else glove = null; } - if (glove == null || !glove.hasTagCompound()) return; + // original speed <= 0 means the block shouldn't be broken, don't increase further + if (glove == null || !glove.hasTagCompound() + || (!PHConstruct.bypassGloveSpeedCheck && event.originalSpeed <= 0)) + return; // ok, we got a glove. bonus mining speeeeed NBTTagCompound tags = glove.getTagCompound().getCompoundTag(TinkerArmor.travelGlove.getBaseTagName()); diff --git a/src/main/java/tconstruct/util/config/PHConstruct.java b/src/main/java/tconstruct/util/config/PHConstruct.java index 3c28867a..d347e702 100644 --- a/src/main/java/tconstruct/util/config/PHConstruct.java +++ b/src/main/java/tconstruct/util/config/PHConstruct.java @@ -352,6 +352,13 @@ public class PHConstruct { true, "Can the Scythe harvest crops in an AOE on right click?.").getBoolean(); + bypassGloveSpeedCheck = config.get( + "Difficulty Changes", + "Tinkerer's Glove Bypass Certain Block Restrictions", + false, + "When true, the Tinkerer's Glove will allow some tools to bypass block breaking restrictions, such as a GT wrench breaking dirt or cable.") + .getBoolean(false); + /* Save the configuration file only if it has changed */ if (config.hasChanged()) config.save(); @@ -559,4 +566,5 @@ public class PHConstruct { // New features public static boolean scytheAoeHarvest; + public static boolean bypassGloveSpeedCheck; }