Prevent tinkerer's glove from applying when initial mining speed is zero (#269)

Co-authored-by: LazyFleshWasTaken <40587985+LazyFleshWasTaken@users.noreply.github.com>
This commit is contained in:
ImaMapleTreeandLazyFleshWasTaken authored and GitHub committed 2026-04-07 02:50:26 +00:00
1 parent bbf0b811cc
commit 5887750976
2 files changed
+12 -1

No files matched your search

@@ -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());
@@ -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;
}