use of baritone.utils.pathing.MutableMoveResult in project baritone by cabaletta.
the class MovementDiagonal method calculateCost.
@Override
public double calculateCost(CalculationContext context) {
MutableMoveResult result = new MutableMoveResult();
cost(context, src.x, src.y, src.z, dest.x, dest.z, result);
if (result.y != dest.y) {
// doesn't apply to us, this position is incorrect
return COST_INF;
}
return result.cost;
}
use of baritone.utils.pathing.MutableMoveResult in project baritone by cabaletta.
the class MovementFall method willPlaceBucket.
private boolean willPlaceBucket() {
CalculationContext context = new CalculationContext(baritone);
MutableMoveResult result = new MutableMoveResult();
return MovementDescend.dynamicFallCost(context, src.x, src.y, src.z, dest.x, dest.z, 0, context.get(dest.x, src.y - 2, dest.z), result);
}
use of baritone.utils.pathing.MutableMoveResult in project baritone by cabaletta.
the class MovementFall method calculateCost.
@Override
public double calculateCost(CalculationContext context) {
MutableMoveResult result = new MutableMoveResult();
MovementDescend.cost(context, src.x, src.y, src.z, dest.x, dest.z, result);
if (result.y != dest.y) {
// doesn't apply to us, this position is a descend not a fall
return COST_INF;
}
return result.cost;
}
use of baritone.utils.pathing.MutableMoveResult in project baritone by cabaletta.
the class MovementParkour method cost.
public static MovementParkour cost(CalculationContext context, BetterBlockPos src, EnumFacing direction) {
MutableMoveResult res = new MutableMoveResult();
cost(context, src.x, src.y, src.z, direction, res);
int dist = Math.abs(res.x - src.x) + Math.abs(res.z - src.z);
return new MovementParkour(context.getBaritone(), src, dist, direction, res.y > src.y);
}
Aggregations