aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/pathfinder/execute
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2026-05-08 17:20:24 -0100
committermat <git@matdoes.dev>2026-05-08 17:20:24 -0100
commitc963b0a5fbe57423ccda0c3b2bfe108439dd895c (patch)
tree0fd5bf9afe338be979048d492ec18332cb4a222a /azalea/src/pathfinder/execute
parent5e0484c925bd7dd7c1d05fdfaf9cee2e66c07dea (diff)
downloadazalea-drasl-c963b0a5fbe57423ccda0c3b2bfe108439dd895c.tar.xz
several stability fixes for pathfinder when doing long paths
Diffstat (limited to 'azalea/src/pathfinder/execute')
-rw-r--r--azalea/src/pathfinder/execute/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/azalea/src/pathfinder/execute/mod.rs b/azalea/src/pathfinder/execute/mod.rs
index a06d1c0f..9e169a91 100644
--- a/azalea/src/pathfinder/execute/mod.rs
+++ b/azalea/src/pathfinder/execute/mod.rs
@@ -427,12 +427,14 @@ pub fn recalculate_near_end_of_path(
if (executing_path.path.len() == 50 || executing_path.path.len() < 5)
&& !pathfinder.is_calculating
&& executing_path.is_path_partial
+ // don't recalculate if we're already planning on switching to a different path
+ && executing_path.queued_path.is_none()
{
match pathfinder.goal.as_ref().cloned() {
Some(goal) => {
debug!("Recalculating path because it's empty or ends soon");
debug!(
- "recalculate_near_end_of_path executing_path.is_path_partial: {}",
+ " executing_path.is_path_partial: {}",
executing_path.is_path_partial
);