Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.9.4-pre4
version=2.9.5-1
shouldRelease=true
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import cc.polyfrost.oneconfig.utils.commands.annotations.SubCommand;
import com.jelly.farmhelperv2.FarmHelper;
import com.jelly.farmhelperv2.config.FarmHelperConfig;
import com.jelly.farmhelperv2.feature.impl.AutoWardrobe;
import com.jelly.farmhelperv2.handler.GameStateHandler;
import com.jelly.farmhelperv2.pathfinder.FlyPathFinderExecutor;
import com.jelly.farmhelperv2.util.LogUtils;
Expand All @@ -15,6 +16,8 @@
import net.minecraft.util.Vec3;

import java.util.Optional;
import java.util.Arrays;
import java.lang.Float;

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

@SubCommand(aliases = {"pf"})
public void pathfind(String x, String y, String z, String threshold,
@Description(value = "Tell the pathfinder, to constantly follow and recalibrate path until arrive", autoCompletesTo = {"true", "false"}) boolean follow,
@Description(value = "Tell the pathfinder, to smooth out the path", autoCompletesTo = {"true", "false"}) boolean smooth,
@Description(value = "Tell to pathfinder, to sprint while flying") boolean sprint) {
try {
FlyPathFinderExecutor.getInstance().setStoppingPositionThreshold(Float.valueOf(threshold));
FlyPathFinderExecutor.getInstance().setSprinting(sprint);
FlyPathFinderExecutor.getInstance().findPath(new Vec3(Float.valueOf(x), Float.valueOf(y), Float.valueOf(z)), follow, smooth);
} catch (Exception e) {
LogUtils.sendError("Could not. KYS");
e.printStackTrace();
}
}

@SubCommand(aliases = {"sp"})
public void stoppath() {
FlyPathFinderExecutor.getInstance().stop();
Expand All @@ -69,8 +87,13 @@ public void update() {
FarmHelperConfig.checkForUpdate();
}

@SubCommand
public void test(){
LogUtils.sendSuccess("SprayonatorState: " + GameStateHandler.getInstance().getSprayonatorState());
@SubCommand(aliases = {"stp"})
public void swapToPest() {
AutoWardrobe.instance.swapTo(FarmHelperConfig.pestFarmingSet0Slot, Arrays.asList(FarmHelperConfig.pestFarmingEq0.split("\\|")));
}

@SubCommand(aliases = {"stf"})
public void swapToFarm() {
AutoWardrobe.instance.swapTo(FarmHelperConfig.pestFarmingSet1Slot, Arrays.asList(FarmHelperConfig.pestFarmingEq1.split("\\|")));
}
}
Loading