From c963b0a5fbe57423ccda0c3b2bfe108439dd895c Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 8 May 2026 17:20:24 -0100 Subject: several stability fixes for pathfinder when doing long paths --- azalea/src/pathfinder/execute/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'azalea/src/pathfinder/execute') 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 ); -- cgit v1.2.3