From fa11e9fa694e3f29a92fb8d5a36fee2424e7ae0c Mon Sep 17 00:00:00 2001 From: Wudji <1215168278@qq.com> Date: Tue, 12 Nov 2024 23:53:23 +0800 Subject: [PATCH] Fix #29, add durability check for persist mode --- src/main/java/troy/autofish/Autofish.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/troy/autofish/Autofish.java b/src/main/java/troy/autofish/Autofish.java index a8ca43e..145cd50 100644 --- a/src/main/java/troy/autofish/Autofish.java +++ b/src/main/java/troy/autofish/Autofish.java @@ -48,6 +48,7 @@ public Autofish(FabricModAutofish modAutofish) { //Initiate the repeating action for persistent mode casting modAutofish.getScheduler().scheduleRepeatingAction(10000, () -> { if(!modAutofish.getConfig().isPersistentMode()) return; + if(modAutofish.getConfig().isNoBreak() && getHeldItem().getDamage() >= 63) return; if(!isHoldingFishingRod()) return; if(hookExists){ if(isBobberInWater()) return;