aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--azalea/src/pathfinder/moves/basic.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/azalea/src/pathfinder/moves/basic.rs b/azalea/src/pathfinder/moves/basic.rs
index 270dc102..539d989d 100644
--- a/azalea/src/pathfinder/moves/basic.rs
+++ b/azalea/src/pathfinder/moves/basic.rs
@@ -311,7 +311,9 @@ fn execute_descend_move(mut ctx: ExecuteCtx) {
start_center.z + (center.z - start_center.z) * 1.5,
);
- if player_pos_to_block_pos(position) != target || horizontal_distance_from_target > 0.25 {
+ if (BlockPos::from(position).horizontal_distance_squared_to(target) > 0)
+ || horizontal_distance_from_target > 0.25
+ {
if horizontal_distance_from_start < 1.25 {
// this basically just exists to avoid doing spins while we're falling
ctx.look_at(dest_ahead);