Search in sources :

Example 1 with GoalNear

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());
}
Also used : GoalXZ(baritone.api.pathing.goals.GoalXZ) BlockPos(net.minecraft.util.math.BlockPos) GoalNear(baritone.api.pathing.goals.GoalNear)

Example 2 with GoalNear

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);
}
Also used : GoalXZ(baritone.api.pathing.goals.GoalXZ) BlockPos(net.minecraft.util.math.BlockPos) GoalNear(baritone.api.pathing.goals.GoalNear)

Aggregations

GoalNear (baritone.api.pathing.goals.GoalNear)2 GoalXZ (baritone.api.pathing.goals.GoalXZ)2 BlockPos (net.minecraft.util.math.BlockPos)2