aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/pathfinder/moves/basic.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-10-03 22:08:18 -0500
committermat <git@matdoes.dev>2023-10-03 22:08:18 -0500
commitbffa28e7069669198906566058aaa668922c54bc (patch)
tree8297aa7544c4f8d9e3a723580cf6d9ebec9b3b8b /azalea/src/pathfinder/moves/basic.rs
parent9c6459a73b232cd73857815677b63ea02cdce13a (diff)
downloadazalea-drasl-bffa28e7069669198906566058aaa668922c54bc.tar.xz
fix world being locked while pathfinding
Diffstat (limited to 'azalea/src/pathfinder/moves/basic.rs')
-rw-r--r--azalea/src/pathfinder/moves/basic.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/azalea/src/pathfinder/moves/basic.rs b/azalea/src/pathfinder/moves/basic.rs
index 26a77f4e..412f463e 100644
--- a/azalea/src/pathfinder/moves/basic.rs
+++ b/azalea/src/pathfinder/moves/basic.rs
@@ -211,7 +211,6 @@ fn execute_descend_move(
);
if BlockPos::from(position) != target || horizontal_distance_from_target > 0.25 {
- // if we're only falling one block then it's fine to try to overshoot
if horizontal_distance_from_start < 1.25 {
// this basically just exists to avoid doing spins while we're falling
look_at_events.send(LookAtEvent {
@@ -232,6 +231,11 @@ fn execute_descend_move(
direction: WalkDirection::Forward,
});
}
+ } else {
+ walk_events.send(StartWalkEvent {
+ entity,
+ direction: WalkDirection::None,
+ });
}
}