From cfbfdd77b4a400ef3bace378ff413aa2ff3bf57c Mon Sep 17 00:00:00 2001 From: mat Date: Mon, 8 Jan 2024 00:12:54 -0600 Subject: fix ping packet, explosion packet, and panic less --- azalea/src/pathfinder/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'azalea/src') diff --git a/azalea/src/pathfinder/mod.rs b/azalea/src/pathfinder/mod.rs index 9fd769e6..360c4df5 100644 --- a/azalea/src/pathfinder/mod.rs +++ b/azalea/src/pathfinder/mod.rs @@ -208,9 +208,11 @@ fn goto_listener( let thread_pool = AsyncComputeTaskPool::get(); for event in events.read() { - let (mut pathfinder, executing_path, position, instance_name, inventory) = query - .get_mut(event.entity) - .expect("Called goto on an entity that's not in the world"); + let Ok((mut pathfinder, executing_path, position, instance_name, inventory)) = + query.get_mut(event.entity) + else { + continue; + }; if event.goal.success(BlockPos::from(position)) { // we're already at the goal, nothing to do -- cgit v1.2.3