From 9ffd0e80bbb3feace231553d6539124585b03e3c Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 6 May 2026 03:36:16 -0100 Subject: change panicking functions in Client and EntityRef to return an AzaleaResult instead --- azalea/src/pathfinder/mod.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'azalea/src/pathfinder') diff --git a/azalea/src/pathfinder/mod.rs b/azalea/src/pathfinder/mod.rs index c577b8e3..e5d1912d 100644 --- a/azalea/src/pathfinder/mod.rs +++ b/azalea/src/pathfinder/mod.rs @@ -281,15 +281,16 @@ impl PathfinderClientExt for Client { } } fn is_goto_target_reached(&self) -> bool { - self.get_component::() + self.component::() + .ok() .is_none_or(|p| p.goal.is_none() && !p.is_calculating) } fn is_executing_path(&self) -> bool { - self.get_component::().is_some() + self.component::().is_ok() } fn is_calculating_path(&self) -> bool { - self.get_component::() - .is_some_and(|p| p.is_calculating) + self.component::() + .is_ok_and(|p| p.is_calculating) } } -- cgit v1.2.3