use of baritone.api.pathing.calc.IPathingControlManager in project baritone by cabaletta.
the class ProcCommand method execute.
@Override
public void execute(String label, IArgConsumer args) throws CommandException {
args.requireMax(0);
IPathingControlManager pathingControlManager = baritone.getPathingControlManager();
IBaritoneProcess process = pathingControlManager.mostRecentInControl().orElse(null);
if (process == null) {
throw new CommandInvalidStateException("No process in control");
}
logDirect(String.format("Class: %s\n" + "Priority: %f\n" + "Temporary: %b\n" + "Display name: %s\n" + "Last command: %s", process.getClass().getTypeName(), process.priority(), process.isTemporary(), process.displayName(), pathingControlManager.mostRecentCommand().map(PathingCommand::toString).orElse("None")));
}
use of baritone.api.pathing.calc.IPathingControlManager in project Spark-Client by Spark-Client-Development.
the class ETACommand method execute.
@Override
public void execute(String label, IArgConsumer args) throws CommandException {
args.requireMax(0);
IPathingControlManager pathingControlManager = baritone.getPathingControlManager();
IBaritoneProcess process = pathingControlManager.mostRecentInControl().orElse(null);
if (process == null) {
throw new CommandInvalidStateException("No process in control");
}
IPathingBehavior pathingBehavior = baritone.getPathingBehavior();
logDirect(String.format("Next segment: %.2f\n" + "Goal: %.2f", pathingBehavior.ticksRemainingInSegment().orElse(-1.0), pathingBehavior.estimatedTicksToGoal().orElse(-1.0)));
}
use of baritone.api.pathing.calc.IPathingControlManager in project Spark-Client by Spark-Client-Development.
the class ProcCommand method execute.
@Override
public void execute(String label, IArgConsumer args) throws CommandException {
args.requireMax(0);
IPathingControlManager pathingControlManager = baritone.getPathingControlManager();
IBaritoneProcess process = pathingControlManager.mostRecentInControl().orElse(null);
if (process == null) {
throw new CommandInvalidStateException("No process in control");
}
logDirect(String.format("Class: %s\n" + "Priority: %f\n" + "Temporary: %b\n" + "Display name: %s\n" + "Last command: %s", process.getClass().getTypeName(), process.priority(), process.isTemporary(), process.displayName(), pathingControlManager.mostRecentCommand().map(PathingCommand::toString).orElse("None")));
}
use of baritone.api.pathing.calc.IPathingControlManager in project baritone by cabaletta.
the class ETACommand method execute.
@Override
public void execute(String label, IArgConsumer args) throws CommandException {
args.requireMax(0);
IPathingControlManager pathingControlManager = baritone.getPathingControlManager();
IBaritoneProcess process = pathingControlManager.mostRecentInControl().orElse(null);
if (process == null) {
throw new CommandInvalidStateException("No process in control");
}
IPathingBehavior pathingBehavior = baritone.getPathingBehavior();
logDirect(String.format("Next segment: %.2f\n" + "Goal: %.2f", pathingBehavior.ticksRemainingInSegment().orElse(-1.0), pathingBehavior.estimatedTicksToGoal().orElse(-1.0)));
}
Aggregations