Package baritone.api.pathing.movement
Interface ActionCosts
- All Known Implementing Classes:
GoalYLevel
public interface ActionCosts
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleTo walk the rest of the way to be centered on the new blockstatic final doubledon't make this Double.MAX_VALUE because it's added to other things, maybe other COST_INFs, and that would make it overflow to negativestatic final doublestatic final doublestatic final double[]static final doubleWhen you hit space, you get enough upward velocity to go 1.25 blocks Then, you fall the remaining 0.25 to get on the surface, on block higher.static final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doubleTo walk off an edge you need to walk 0.5 to the edge then 0.3 to start falling offstatic final doubleThese costs are measured roughly in ticks btwstatic final doublestatic final double -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic doubledistanceToTicks(double distance) static double[]static doubleoldFormula(double ticks) static doublevelocity(int ticks)
-
Field Details
-
WALK_ONE_BLOCK_COST
These costs are measured roughly in ticks btw- See Also:
-
WALK_ONE_IN_WATER_COST
- See Also:
-
WALK_ONE_OVER_SOUL_SAND_COST
- See Also:
-
LADDER_UP_ONE_COST
- See Also:
-
LADDER_DOWN_ONE_COST
- See Also:
-
SNEAK_ONE_BLOCK_COST
- See Also:
-
SPRINT_ONE_BLOCK_COST
- See Also:
-
SPRINT_MULTIPLIER
- See Also:
-
WALK_OFF_BLOCK_COST
To walk off an edge you need to walk 0.5 to the edge then 0.3 to start falling off- See Also:
-
CENTER_AFTER_FALL_COST
To walk the rest of the way to be centered on the new block- See Also:
-
COST_INF
don't make this Double.MAX_VALUE because it's added to other things, maybe other COST_INFs, and that would make it overflow to negative- See Also:
-
FALL_N_BLOCKS_COST
-
FALL_1_25_BLOCKS_COST
-
FALL_0_25_BLOCKS_COST
-
JUMP_ONE_BLOCK_COST
When you hit space, you get enough upward velocity to go 1.25 blocks Then, you fall the remaining 0.25 to get on the surface, on block higher. Since parabolas are symmetric, the amount of time it takes to ascend up from 1 to 1.25 will be the same amount of time that it takes to fall back down from 1.25 to 1. And the same applies to the overall shape, if it takes X ticks to fall back down 1.25 blocks, it will take X ticks to reach the peak of your 1.25 block leap. Therefore, the part of your jump from y=0 to y=1.25 takes distanceToTicks(1.25) ticks, and the sub-part from y=1 to y=1.25 takes distanceToTicks(0.25) ticks. Therefore, the other sub-part, from y=0 to y-1, takes distanceToTicks(1.25)-distanceToTicks(0.25) ticks. That's why JUMP_ONE_BLOCK_COST = FALL_1_25_BLOCKS_COST - FALL_0_25_BLOCKS_COST
-
-
Method Details
-
generateFallNBlocksCost
-
velocity
-
oldFormula
-
distanceToTicks
-