From ddb21fdd4acf6e03fecef33b16f3acc25e4eaf30 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 17 Jan 2026 02:43:13 -0530 Subject: move PathfinderHeap to a module --- azalea/src/pathfinder/goals.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'azalea/src/pathfinder/goals.rs') 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 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. -- cgit v1.2.3