From 89564da6b1ed2b424a4649d230a694b425e015cb Mon Sep 17 00:00:00 2001 From: mat Date: Mon, 18 Aug 2025 08:27:00 +0600 Subject: fix DataComponentPatch::get --- azalea-client/src/entity_query.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'azalea-client/src') diff --git a/azalea-client/src/entity_query.rs b/azalea-client/src/entity_query.rs index 84fcf9e7..55b86d6c 100644 --- a/azalea-client/src/entity_query.rs +++ b/azalea-client/src/entity_query.rs @@ -84,7 +84,6 @@ impl Client { /// efficient to use [`Self::any_entity_by`] instead. You can also use /// [`Self::nearest_entities_by`] to get all nearby entities. /// - /// # Example /// ``` /// use azalea_entity::{LocalEntity, Position, metadata::Player}; /// use bevy_ecs::query::{With, Without}; @@ -112,6 +111,15 @@ impl Client { /// all entities in our instance that match the predicate. /// /// The first entity is the nearest one. + /// + /// ``` + /// # use azalea_entity::{LocalEntity, Position, metadata::Player}; + /// # use bevy_ecs::query::{With, Without}; + /// # fn example(mut bot: azalea_client::Client, sender_name: String) { + /// let nearby_players = + /// bot.nearest_entities_by::<(With, Without), ()>(|_: &()| true); + /// # } + /// ``` pub fn nearest_entities_by( &self, predicate: impl EntityPredicate, -- cgit v1.2.3