From 9aaf893588eaecd62f6b146897cbce8a3a5058b5 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 12 Oct 2025 22:10:02 -0300 Subject: improve ux for entity matching functions --- azalea/examples/testbot/commands.rs | 4 ++-- azalea/examples/testbot/commands/debug.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'azalea/examples') diff --git a/azalea/examples/testbot/commands.rs b/azalea/examples/testbot/commands.rs index 1616b82e..9d9d9b8a 100644 --- a/azalea/examples/testbot/commands.rs +++ b/azalea/examples/testbot/commands.rs @@ -32,8 +32,8 @@ impl CommandSource { pub fn entity(&mut self) -> Option { let username = self.chat.sender()?; self.bot - .any_entity_by::, &GameProfileComponent>( - |profile: &&GameProfileComponent| profile.name == username, + .any_entity_by::<&GameProfileComponent, With>( + |profile: &GameProfileComponent| profile.name == username, ) } } diff --git a/azalea/examples/testbot/commands/debug.rs b/azalea/examples/testbot/commands/debug.rs index d80ee3be..91f7dc61 100644 --- a/azalea/examples/testbot/commands/debug.rs +++ b/azalea/examples/testbot/commands/debug.rs @@ -218,7 +218,7 @@ pub fn register(commands: &mut CommandDispatcher>) { let source = ctx.source.lock(); let player_entities = source .bot - .nearest_entities_by::, ()>(|_: &()| true); + .nearest_entities_by::<(), With>(|_: ()| true); let tab_list = source.bot.tab_list(); for player_entity in player_entities { let uuid = source.bot.entity_component::(player_entity); -- cgit v1.2.3