diff options
| author | mat <git@matdoes.dev> | 2024-01-08 00:12:54 -0600 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-01-08 00:12:54 -0600 |
| commit | cfbfdd77b4a400ef3bace378ff413aa2ff3bf57c (patch) | |
| tree | 2d5fc56e4b2fbccb27b0a07c14002cf4c5eefaa0 /azalea/src/pathfinder/mod.rs | |
| parent | 0aa439d5caa8028b6d310de45258cbcef16ca2eb (diff) | |
| download | azalea-drasl-cfbfdd77b4a400ef3bace378ff413aa2ff3bf57c.tar.xz | |
fix ping packet, explosion packet, and panic less
Diffstat (limited to 'azalea/src/pathfinder/mod.rs')
| -rw-r--r-- | azalea/src/pathfinder/mod.rs | 8 |
1 files changed, 5 insertions, 3 deletions
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 |
