diff options
| author | mat <git@matdoes.dev> | 2026-01-17 02:43:13 -0530 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2026-01-17 02:43:13 -0530 |
| commit | ddb21fdd4acf6e03fecef33b16f3acc25e4eaf30 (patch) | |
| tree | 9682ab52eac761f27c8f11a60eb99f63f1311e21 /azalea/src/pathfinder/goals.rs | |
| parent | 02280dc6e2c559452f00eed9c5c23efa0d6cb5fe (diff) | |
| download | azalea-drasl-ddb21fdd4acf6e03fecef33b16f3acc25e4eaf30.tar.xz | |
move PathfinderHeap to a module
Diffstat (limited to 'azalea/src/pathfinder/goals.rs')
| -rw-r--r-- | azalea/src/pathfinder/goals.rs | 5 |
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. |
