From 39943447f68fede8e8ed6799cc8eee7bddecf945 Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 26 Jul 2023 00:45:06 -0500 Subject: fix querying multiple components in entity_by --- azalea-client/src/entity_query.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'azalea-client/src') diff --git a/azalea-client/src/entity_query.rs b/azalea-client/src/entity_query.rs index 0320457f..d3fa522b 100644 --- a/azalea-client/src/entity_query.rs +++ b/azalea-client/src/entity_query.rs @@ -43,7 +43,7 @@ impl Client { /// /// # fn example(mut bot: Client, sender_name: String) { /// let entity = bot.entity_by::, (&GameProfileComponent,)>( - /// |profile: &&GameProfileComponent| profile.name == sender_name, + /// |(profile,): &(&GameProfileComponent,)| profile.name == sender_name, /// ); /// if let Some(entity) = entity { /// let position = bot.entity_component::(entity); @@ -76,7 +76,7 @@ impl Client { pub trait EntityPredicate { fn find(&self, ecs_lock: Arc>) -> Option; } -impl EntityPredicate<(Q,), Filter> for F +impl EntityPredicate for F where F: Fn(&ROQueryItem) -> bool, Q: ReadOnlyWorldQuery, -- cgit v1.2.3