mirror of https://github.com/cabaletta/baritone
Simplify some player context references
This commit is contained in:
parent
2022d33d03
commit
76fe0d14d3
|
@ -51,7 +51,7 @@ public class GoalCommand extends Command {
|
|||
}
|
||||
} else {
|
||||
args.requireMax(3);
|
||||
BetterBlockPos origin = baritone.getPlayerContext().playerFeet();
|
||||
BetterBlockPos origin = ctx.playerFeet();
|
||||
Goal goal = args.getDatatypePost(RelativeGoal.INSTANCE, origin);
|
||||
goalProcess.setGoal(goal);
|
||||
logDirect(String.format("Goal: %s", goal.toString()));
|
||||
|
|
|
@ -46,7 +46,7 @@ public class GotoCommand extends Command {
|
|||
// is no need to handle the case of empty arguments.
|
||||
if (args.peekDatatypeOrNull(RelativeCoordinate.INSTANCE) != null) {
|
||||
args.requireMax(3);
|
||||
BetterBlockPos origin = baritone.getPlayerContext().playerFeet();
|
||||
BetterBlockPos origin = ctx.playerFeet();
|
||||
Goal goal = args.getDatatypePost(RelativeGoal.INSTANCE, origin);
|
||||
logDirect(String.format("Going to: %s", goal.toString()));
|
||||
baritone.getCustomGoalProcess().setGoalAndPath(goal);
|
||||
|
|
Loading…
Reference in New Issue