Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

Commit 0ab8cdf

Browse files
authored
Merge pull request #274 from osamabeinglagging/master
Pest Farmer
2 parents 4e776d6 + 9052236 commit 0ab8cdf

18 files changed

Lines changed: 1673 additions & 215 deletions

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ baseGroup=com.jelly.farmhelperv2
44
mcVersion=1.8.9
55
modid=farmhelperv2
66
modName=FarmHelper
7-
version=2.9.4-pre4
7+
version=2.9.5-1
88
shouldRelease=true

src/main/java/com/jelly/farmhelperv2/command/FarmHelperMainCommand.java

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import cc.polyfrost.oneconfig.utils.commands.annotations.SubCommand;
77
import com.jelly.farmhelperv2.FarmHelper;
88
import com.jelly.farmhelperv2.config.FarmHelperConfig;
9+
import com.jelly.farmhelperv2.feature.impl.AutoWardrobe;
910
import com.jelly.farmhelperv2.handler.GameStateHandler;
1011
import com.jelly.farmhelperv2.pathfinder.FlyPathFinderExecutor;
1112
import com.jelly.farmhelperv2.util.LogUtils;
@@ -15,6 +16,8 @@
1516
import net.minecraft.util.Vec3;
1617

1718
import java.util.Optional;
19+
import java.util.Arrays;
20+
import java.lang.Float;
1821

1922
@Command(value = "fh", aliases = {"farmhelper"}, description = "FarmHelper main command")
2023
public class FarmHelperMainCommand {
@@ -58,6 +61,21 @@ public void pathfind(int x, int y, int z,
5861
FlyPathFinderExecutor.getInstance().findPath(new Vec3(x, y, z), follow, smooth);
5962
}
6063

64+
@SubCommand(aliases = {"pf"})
65+
public void pathfind(String x, String y, String z, String threshold,
66+
@Description(value = "Tell the pathfinder, to constantly follow and recalibrate path until arrive", autoCompletesTo = {"true", "false"}) boolean follow,
67+
@Description(value = "Tell the pathfinder, to smooth out the path", autoCompletesTo = {"true", "false"}) boolean smooth,
68+
@Description(value = "Tell to pathfinder, to sprint while flying") boolean sprint) {
69+
try {
70+
FlyPathFinderExecutor.getInstance().setStoppingPositionThreshold(Float.valueOf(threshold));
71+
FlyPathFinderExecutor.getInstance().setSprinting(sprint);
72+
FlyPathFinderExecutor.getInstance().findPath(new Vec3(Float.valueOf(x), Float.valueOf(y), Float.valueOf(z)), follow, smooth);
73+
} catch (Exception e) {
74+
LogUtils.sendError("Could not. KYS");
75+
e.printStackTrace();
76+
}
77+
}
78+
6179
@SubCommand(aliases = {"sp"})
6280
public void stoppath() {
6381
FlyPathFinderExecutor.getInstance().stop();
@@ -69,8 +87,13 @@ public void update() {
6987
FarmHelperConfig.checkForUpdate();
7088
}
7189

72-
@SubCommand
73-
public void test(){
74-
LogUtils.sendSuccess("SprayonatorState: " + GameStateHandler.getInstance().getSprayonatorState());
90+
@SubCommand(aliases = {"stp"})
91+
public void swapToPest() {
92+
AutoWardrobe.instance.swapTo(FarmHelperConfig.pestFarmingSet0Slot, Arrays.asList(FarmHelperConfig.pestFarmingEq0.split("\\|")));
93+
}
94+
95+
@SubCommand(aliases = {"stf"})
96+
public void swapToFarm() {
97+
AutoWardrobe.instance.swapTo(FarmHelperConfig.pestFarmingSet1Slot, Arrays.asList(FarmHelperConfig.pestFarmingEq1.split("\\|")));
7598
}
7699
}

0 commit comments

Comments
 (0)