aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/pathfinder/moves/basic.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-06-09 21:33:21 -0330
committermat <git@matdoes.dev>2025-06-09 21:33:21 -0330
commite4ead93f195d3d91fd809dfc8cfee9cc36aabcbc (patch)
tree3be2352136fb71433a57a9cbf938005e8e7f9b5b /azalea/src/pathfinder/moves/basic.rs
parent086f979a2895e7f15ec61e5704869a0cfc94d16f (diff)
downloadazalea-drasl-e4ead93f195d3d91fd809dfc8cfee9cc36aabcbc.tar.xz
jump if in water while executing pathfinder path
Diffstat (limited to 'azalea/src/pathfinder/moves/basic.rs')
-rw-r--r--azalea/src/pathfinder/moves/basic.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/azalea/src/pathfinder/moves/basic.rs b/azalea/src/pathfinder/moves/basic.rs
index fe0d81f5..e352f385 100644
--- a/azalea/src/pathfinder/moves/basic.rs
+++ b/azalea/src/pathfinder/moves/basic.rs
@@ -55,6 +55,7 @@ fn execute_forward_move(mut ctx: ExecuteCtx) {
}
ctx.look_at(center);
+ ctx.jump_if_in_water();
ctx.sprint(SprintDirection::Forward);
}
@@ -141,6 +142,7 @@ fn execute_ascend_move(mut ctx: ExecuteCtx) {
ctx.look_at(target_center);
ctx.walk(WalkDirection::Forward);
+ ctx.jump_if_in_water();
// these checks are to make sure we don't fall if our velocity is too high in
// the wrong direction
@@ -439,6 +441,7 @@ fn execute_diagonal_move(mut ctx: ExecuteCtx) {
ctx.look_at(target_center);
ctx.sprint(SprintDirection::Forward);
+ ctx.jump_if_in_water();
}
/// Go directly down, usually by mining.