aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/pathfinder/moves/basic.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-05-06 10:58:48 -1000
committermat <git@matdoes.dev>2025-05-07 06:59:22 +1000
commitf7c9419045470495fe76b0167d09d17c3cf4cc56 (patch)
treeb8bb1c4cc19fa9a6887224a57c43af9334ef285d /azalea/src/pathfinder/moves/basic.rs
parentaf3affb467c01ee2880fbbc366ea0420c0580ab8 (diff)
downloadazalea-drasl-f7c9419045470495fe76b0167d09d17c3cf4cc56.tar.xz
pathfinder can now handle slabs, stairs, and dirt paths
Diffstat (limited to 'azalea/src/pathfinder/moves/basic.rs')
-rw-r--r--azalea/src/pathfinder/moves/basic.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/azalea/src/pathfinder/moves/basic.rs b/azalea/src/pathfinder/moves/basic.rs
index 4955ed08..d23bb894 100644
--- a/azalea/src/pathfinder/moves/basic.rs
+++ b/azalea/src/pathfinder/moves/basic.rs
@@ -135,7 +135,10 @@ fn execute_ascend_move(mut ctx: ExecuteCtx) {
}
if BlockPos::from(position) == start {
- ctx.jump();
+ // only jump if the target is more than 0.5 blocks above us
+ if target.y as f64 - position.y > 0.5 {
+ ctx.jump();
+ }
}
}
#[must_use]