use of baritone.api.pathing.goals.GoalNear in project Spark-Client by Spark-Client-Development.
the class FollowProcess method towards.
private Goal towards(Entity following) {
BlockPos pos;
if (Baritone.settings().followOffsetDistance.getValue() == 0) {
pos = new BlockPos(following);
} else {
GoalXZ g = GoalXZ.fromDirection(following.getPositionVector(), Baritone.settings().followOffsetDirection.getValue().floatValue(), Baritone.settings().followOffsetDistance.getValue());
pos = new BlockPos(g.getX(), following.posY, g.getZ());
}
return new GoalNear(pos, Baritone.settings().followRadius.getValue());
}
use of baritone.api.pathing.goals.GoalNear in project baritone by cabaletta.
the class FollowProcess method towards.
private Goal towards(Entity following) {
BlockPos pos;
if (Baritone.settings().followOffsetDistance.value == 0) {
pos = new BlockPos(following);
} else {
GoalXZ g = GoalXZ.fromDirection(following.getPositionVector(), Baritone.settings().followOffsetDirection.value, Baritone.settings().followOffsetDistance.value);
pos = new BlockPos(g.getX(), following.posY, g.getZ());
}
return new GoalNear(pos, Baritone.settings().followRadius.value);
}