Skip to content

Commit

Permalink
+ Pests destroyer changes (added pathfinding as fallback)
Browse files Browse the repository at this point in the history
  • Loading branch information
onixiya1337 committed Dec 19, 2023
1 parent 6426191 commit 92e190f
Show file tree
Hide file tree
Showing 6 changed files with 141 additions and 92 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ baseGroup=com.jelly.farmhelperv2
mcVersion=1.8.9
modid=farmhelperv2
modName=FarmHelper
version=2.2.5
version=2.2.6-pre
shouldRelease=true
5 changes: 0 additions & 5 deletions src/main/java/com/jelly/farmhelperv2/FarmHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ public void onTickSendInfoAboutShittyClient(TickEvent.PlayerTickEvent event) {
Notifications.INSTANCE.send("FarmHelper", "Pests Killer Ticks Of Not Seeing Pest While Attacking has been set to 100 ticks because of a bug in the previous version.", 15000);
LogUtils.sendWarning("Pests Killer Ticks Of Not Seeing Pest While Attacking has been set to 100 ticks because of a bug in the previous version.");
}
if (FarmHelperConfig.configVersion == 1 && FarmHelperConfig.enablePestsDestroyerPathfindingLongerDistances) {
FarmHelperConfig.enablePestsDestroyerPathfindingLongerDistances = false;
Notifications.INSTANCE.send("FarmHelper", "Enable Pests Destroyer Pathfinding Longer Distances has been disabled. We don't recommend using it for now. You can enable it again if you wish.", 15000);
LogUtils.sendWarning("Enable Pests Destroyer Pathfinding Longer Distances has been disabled. We don't recommend using it for now. You can enable it again if you wish.");
}
if (FarmHelperConfig.configVersion == 1)
FarmHelperConfig.configVersion = 2;
sentInfoAboutShittyClient = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@ public enum SPRAYONATOR_ITEM {

@Switch(
name = "Sprint while flying", category = PESTS_DESTROYER, subcategory = "Pests Destroyer",
description = "Springs while flying"
description = "Sprints while flying"
)
public static boolean sprintWhileFlying = false;

Expand Down Expand Up @@ -1152,31 +1152,6 @@ public static void triggerManuallyPestsDestroyer() {
)
public static OneKeyBind enablePestsDestroyerKeyBind = new OneKeyBind(Keyboard.KEY_NONE);

@Switch(
name = "Recalculate path after pest escaped", category = PESTS_DESTROYER, subcategory = "Pathfinding",
description = "Recalculates the path after pest escaped"
)
public static boolean recalculatePathAfterPestEscapedEnabled = false;

@Slider(
name = "Recalculate path after pest escaped X blocks", category = PESTS_DESTROYER, subcategory = "Pathfinding",
description = "",
min = 3, max = 10
)
public static int recalculatePathAfterPestEscaped = 5;

@Switch(
name = "Enable Pests Destroyer Pathfinding for medium distances", category = PESTS_DESTROYER, subcategory = "Pathfinding",
description = "Enables the pests destroyer pathfinding for medium distances",
size = 2
)
public static boolean enablePestsDestroyerPathfindingMediumDistances = false;
@Switch(
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 = 2
)
public static boolean enablePestsDestroyerPathfindingLongerDistances = false;
//</editor-fold>

//<editor-fold desc="Drawings">
Expand Down Expand Up @@ -1641,13 +1616,6 @@ public FarmHelperConfig() {
this.addDependency("pestAdditionalGUIDelay", "enablePestsDestroyer");
this.addDependency("sprintWhileFlying", "enablePestsDestroyer");
this.addDependency("pausePestsDestroyerDuringJacobsContest", "enablePestsDestroyer");
this.addDependency("recalculatePathAfterPestEscapedEnabled", "enablePestsDestroyer");
this.addDependency("recalculatePathAfterPestEscaped", "recalculatePathAfterPestEscapedEnabled");
this.addDependency("enablePestsDestroyerPathfindingMediumDistances", "enablePestsDestroyer");
this.addDependency("enablePestsDestroyerPathfindingLongerDistances", "enablePestsDestroyer");


this.addDependency("recalculatePathAfterPestEscaped", "recalculatePathAfterPestEscapedEnabled");


this.hideIf("infoCookieBuffRequired", () -> GameStateHandler.getInstance().inGarden() || GameStateHandler.getInstance().getCookieBuffState() == GameStateHandler.BuffState.NOT_ACTIVE);
Expand Down
Loading

0 comments on commit 92e190f

Please sign in to comment.