diff --git a/gradle.properties b/gradle.properties index 0cd5b876..feeb6b5c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,4 +5,4 @@ mcVersion=1.8.9 modid=farmhelperv2 modName=FarmHelper version=2.2.1 -shouldRelease=false +shouldRelease=true diff --git a/src/main/java/com/jelly/farmhelperv2/config/FarmHelperConfig.java b/src/main/java/com/jelly/farmhelperv2/config/FarmHelperConfig.java index f8f93d0e..596fed34 100644 --- a/src/main/java/com/jelly/farmhelperv2/config/FarmHelperConfig.java +++ b/src/main/java/com/jelly/farmhelperv2/config/FarmHelperConfig.java @@ -630,7 +630,7 @@ public enum SPRAYONATOR_ITEM { description = "The minimum BPS drop to trigger failsafe", min = 2, max = 50 ) - public static int averageBPSDrop = 5; + public static int averageBPSDrop = 15; @Button( name = "Test failsafe", category = FAILSAFE, subcategory = "Miscellaneous", @@ -1155,13 +1155,13 @@ public static void triggerManuallyPestsDestroyer() { @Switch( name = "Enable Pests Destroyer Pathfinding for medium distances", category = PESTS_DESTROYER, subcategory = "Pathfinding", description = "Enables the pests destroyer pathfinding for medium distances", - size = 1 + size = 2 ) public static boolean enablePestsDestroyerPathfindingMediumDistances = true; @Switch( - name = "Enable Pests Destroyer Pathfinding for longer distances", category = PESTS_DESTROYER, subcategory = "Pathfinding", + name = "Enable Pests Destroyer Pathfinding for longer distances (not recommended)", category = PESTS_DESTROYER, subcategory = "Pathfinding", description = "Enables the pests destroyer pathfinding for longer distances", - size = 1 + size = 2 ) public static boolean enablePestsDestroyerPathfindingLongerDistances = false; // diff --git a/src/main/java/com/jelly/farmhelperv2/feature/impl/PestsDestroyer.java b/src/main/java/com/jelly/farmhelperv2/feature/impl/PestsDestroyer.java index 2f732f55..2b660223 100644 --- a/src/main/java/com/jelly/farmhelperv2/feature/impl/PestsDestroyer.java +++ b/src/main/java/com/jelly/farmhelperv2/feature/impl/PestsDestroyer.java @@ -605,13 +605,13 @@ public void onTickExecute(TickEvent.ClientTickEvent event) { } KeyBindUtils.holdThese(mc.gameSettings.keyBindUseItem); } else if (((distance <= 10 || distanceXZ <= 2) && !FarmHelperConfig.enablePestsDestroyerPathfindingMediumDistances) - || ((distanceXZ <= 10) && FarmHelperConfig.enablePestsDestroyerPathfindingMediumDistances)) { + || (!FlyPathfinder.getInstance().hasFailed && distanceXZ <= 10 && FarmHelperConfig.enablePestsDestroyerPathfindingMediumDistances)) { if (!mc.thePlayer.capabilities.isFlying) { flyAwayFromGround(); delayClock.schedule(350); break; } - if (FarmHelperConfig.enablePestsDestroyerPathfindingMediumDistances) { + if (FarmHelperConfig.enablePestsDestroyerPathfindingMediumDistances && !FlyPathfinder.getInstance().hasFailed) { flyPathfinding(entity); break; } else { @@ -635,7 +635,7 @@ public void onTickExecute(TickEvent.ClientTickEvent event) { } } else { cantReachPest = 0; - if (FarmHelperConfig.enablePestsDestroyerPathfindingLongerDistances) { + if (FarmHelperConfig.enablePestsDestroyerPathfindingLongerDistances && !FlyPathfinder.getInstance().hasFailed) { flyPathfinding(entity); } else { if (distanceXZ < 6 && distance > 10 && mc.thePlayer.capabilities.isFlying) { @@ -712,9 +712,9 @@ private void flyPathfinding(Entity entity) { return; } if (FlyPathfinder.getInstance().hasGoal() && FlyPathfinder.getInstance().hasFailed) { - LogUtils.sendError("[Pests Destroyer] Failed to get path to " + FlyPathfinder.getInstance().getGoal()); + LogUtils.sendWarning("[Pests Destroyer] Failed to get path to " + FlyPathfinder.getInstance().getGoal() + ". Falling back to normal flying behavior."); FlyPathfinder.getInstance().stop(); - escapeState = EscapeState.GO_TO_HUB; +// escapeState = EscapeState.GO_TO_HUB; KeyBindUtils.stopMovement(); delayClock.schedule(300); return;