diff options
| author | mat <git@matdoes.dev> | 2025-08-12 11:00:11 -1000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-08-12 11:00:11 -1000 |
| commit | 7f4e3c583dd669561e8502822952fc9afe26e005 (patch) | |
| tree | 831fbcb717493858c31ad58796e01494da276d76 /azalea/examples | |
| parent | c36c3c0ed02b3727ba61b45a6a7febf1a008a7dc (diff) | |
| download | azalea-drasl-7f4e3c583dd669561e8502822952fc9afe26e005.tar.xz | |
add nearest_entity_by and improve some docs
Diffstat (limited to 'azalea/examples')
| -rw-r--r-- | azalea/examples/testbot/commands.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/azalea/examples/testbot/commands.rs b/azalea/examples/testbot/commands.rs index ecd68ade..7486780e 100644 --- a/azalea/examples/testbot/commands.rs +++ b/azalea/examples/testbot/commands.rs @@ -31,9 +31,10 @@ impl CommandSource { pub fn entity(&mut self) -> Option<Entity> { let username = self.chat.sender()?; - self.bot.entity_by::<With<Player>, &GameProfileComponent>( - |profile: &&GameProfileComponent| profile.name == username, - ) + self.bot + .any_entity_by::<With<Player>, &GameProfileComponent>( + |profile: &&GameProfileComponent| profile.name == username, + ) } } |
