From 03087b91961c7437c439031eecab3b6415203f52 Mon Sep 17 00:00:00 2001 From: Wudji <1215168278@qq.com> Date: Tue, 12 Nov 2024 23:45:37 +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 a075cd6..0b2afed 100644 --- a/src/main/java/troy/autofish/Autofish.java +++ b/src/main/java/troy/autofish/Autofish.java @@ -46,6 +46,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;