use of baritone.api.process.ICustomGoalProcess in project baritone by cabaletta.
the class GoalCommand method execute.
@Override
public void execute(String label, IArgConsumer args) throws CommandException {
ICustomGoalProcess goalProcess = baritone.getCustomGoalProcess();
if (args.hasAny() && Arrays.asList("reset", "clear", "none").contains(args.peekString())) {
args.requireMax(1);
if (goalProcess.getGoal() != null) {
goalProcess.setGoal(null);
logDirect("Cleared goal");
} else {
logDirect("There was no goal to clear");
}
} else {
args.requireMax(3);
BetterBlockPos origin = baritone.getPlayerContext().playerFeet();
Goal goal = args.getDatatypePost(RelativeGoal.INSTANCE, origin);
goalProcess.setGoal(goal);
logDirect(String.format("Goal: %s", goal.toString()));
}
}
use of baritone.api.process.ICustomGoalProcess in project baritone by cabaletta.
the class PathCommand method execute.
@Override
public void execute(String label, IArgConsumer args) throws CommandException {
ICustomGoalProcess customGoalProcess = baritone.getCustomGoalProcess();
args.requireMax(0);
WorldScanner.INSTANCE.repack(ctx);
customGoalProcess.path();
logDirect("Now pathing");
}
use of baritone.api.process.ICustomGoalProcess in project Spark-Client by Spark-Client-Development.
the class InvertCommand method execute.
@Override
public void execute(String label, IArgConsumer args) throws CommandException {
args.requireMax(0);
ICustomGoalProcess customGoalProcess = baritone.getCustomGoalProcess();
Goal goal;
if ((goal = customGoalProcess.getGoal()) == null) {
throw new CommandInvalidStateException("No goal");
}
if (goal instanceof GoalInverted) {
goal = ((GoalInverted) goal).origin;
} else {
goal = new GoalInverted(goal);
}
customGoalProcess.setGoalAndPath(goal);
logDirect(String.format("Goal: %s", goal.toString()));
}
use of baritone.api.process.ICustomGoalProcess in project Spark-Client by Spark-Client-Development.
the class PathCommand method execute.
@Override
public void execute(String label, IArgConsumer args) throws CommandException {
ICustomGoalProcess customGoalProcess = baritone.getCustomGoalProcess();
args.requireMax(0);
WorldScanner.INSTANCE.repack(ctx);
customGoalProcess.path();
logDirect("Now pathing");
}
use of baritone.api.process.ICustomGoalProcess in project Spark-Client by Spark-Client-Development.
the class GoalCommand method execute.
@Override
public void execute(String label, IArgConsumer args) throws CommandException {
ICustomGoalProcess goalProcess = baritone.getCustomGoalProcess();
if (args.hasAny() && Arrays.asList("reset", "clear", "none").contains(args.peekString())) {
args.requireMax(1);
if (goalProcess.getGoal() != null) {
goalProcess.setGoal(null);
logDirect("Cleared goal");
} else {
logDirect("There was no goal to clear");
}
} else {
args.requireMax(3);
BetterBlockPos origin = baritone.getPlayerContext().playerFeet();
Goal goal = args.getDatatypePost(RelativeGoal.INSTANCE, origin);
goalProcess.setGoal(goal);
logDirect(String.format("Goal: %s", goal.toString()));
}
}
Aggregations