Skip to content

Commit

Permalink
+ AntiStuck - Tweaks and additions, will trigger if got lag back whil…
Browse files Browse the repository at this point in the history
…e farming

= Always Hold W - Fixed changing lane
= Pests Destroyer - Additional kinda fix for false teleport check
+ Additional logs for auto switch tool
= Visitors Macro - Fixed sometimes not accepting profitable drops and speed tweaks
= Auto Repellant - Another possible fix
= Pest Destroyer - Fixed not flying after tp'ing to water
+ Logs
= Pathfinder fixes/tweaks
  • Loading branch information
May2Beez committed Dec 16, 2023
2 parents c6c4c56 + fd5b1d7 commit 63a8f7e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ mcVersion=1.8.9
modid=farmhelperv2
modName=FarmHelper
version=2.2.1
shouldRelease=false
shouldRelease=true
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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;
//</editor-fold>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 63a8f7e

Please sign in to comment.