aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/pathfinder/moves
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2024-12-24 05:18:33 +0000
committermat <git@matdoes.dev>2024-12-24 05:18:33 +0000
commitde5a53ce08de5b9d77bce99dd9ecde3171ebd74e (patch)
tree02c84b356f8dc20ea882793001dd229adfa02121 /azalea/src/pathfinder/moves
parent958848e8ed10c7b8a83c9faea1fac6eaac39b018 (diff)
downloadazalea-drasl-de5a53ce08de5b9d77bce99dd9ecde3171ebd74e.tar.xz
add additional pathfinder test and fix pathfinder failure
Diffstat (limited to 'azalea/src/pathfinder/moves')
-rw-r--r--azalea/src/pathfinder/moves/parkour.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/azalea/src/pathfinder/moves/parkour.rs b/azalea/src/pathfinder/moves/parkour.rs
index 0f279dca..1d35f323 100644
--- a/azalea/src/pathfinder/moves/parkour.rs
+++ b/azalea/src/pathfinder/moves/parkour.rs
@@ -1,5 +1,6 @@
use azalea_client::{SprintDirection, WalkDirection};
use azalea_core::{direction::CardinalDirection, position::BlockPos};
+use tracing::trace;
use super::{Edge, ExecuteCtx, IsReachedCtx, MoveData, PathfinderCtx};
use crate::pathfinder::{astar, costs::*};
@@ -212,12 +213,14 @@ fn execute_parkour_move(mut ctx: ExecuteCtx) {
if !is_at_start_block
&& !is_at_jump_block
&& (position.y - start.y as f64) < 0.094
- && distance_from_start < 0.81
+ && distance_from_start < 0.85
{
// we have to be on the start block to jump
ctx.look_at(start_center);
+ trace!("looking at start_center");
} else {
ctx.look_at(target_center);
+ trace!("looking at target_center");
}
if !is_at_start_block && is_at_jump_block && distance_from_start > required_distance_from_center