aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/pathfinder/goals.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2026-01-17 02:43:13 -0530
committermat <git@matdoes.dev>2026-01-17 02:43:13 -0530
commitddb21fdd4acf6e03fecef33b16f3acc25e4eaf30 (patch)
tree9682ab52eac761f27c8f11a60eb99f63f1311e21 /azalea/src/pathfinder/goals.rs
parent02280dc6e2c559452f00eed9c5c23efa0d6cb5fe (diff)
downloadazalea-drasl-ddb21fdd4acf6e03fecef33b16f3acc25e4eaf30.tar.xz
move PathfinderHeap to a module
Diffstat (limited to 'azalea/src/pathfinder/goals.rs')
-rw-r--r--azalea/src/pathfinder/goals.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/azalea/src/pathfinder/goals.rs b/azalea/src/pathfinder/goals.rs
index 26915b2f..25db9c8e 100644
--- a/azalea/src/pathfinder/goals.rs
+++ b/azalea/src/pathfinder/goals.rs
@@ -98,6 +98,7 @@ impl From<BlockPos> for XZGoal {
fn y_heuristic(dy: f32) -> f32 {
if dy > 0. {
if BARITONE_COMPAT {
+ // this is wrong because it can be an overestimate
return *JUMP_ONE_BLOCK_COST * dy;
}
@@ -107,8 +108,8 @@ fn y_heuristic(dy: f32) -> f32 {
(f32::max(*JUMP_ONE_BLOCK_COST, WALK_ONE_BLOCK_COST) + JUMP_PENALTY - SPRINT_ONE_BLOCK_COST)
* dy
} else if dy < 0. {
- // this is an overestimate (copied from baritone), but fixing it makes perf
- // worse
+ // this is also an overestimate (copied from baritone), but fixing it makes perf
+ // too much worse
(FALL_N_BLOCKS_COST[2] / 2.) * -dy
} else {
0.