diff options
| author | mat <git@matdoes.dev> | 2025-08-18 08:27:00 +0600 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-08-18 08:27:00 +0600 |
| commit | 89564da6b1ed2b424a4649d230a694b425e015cb (patch) | |
| tree | 506e70486842dae3f40799e8794cfdb5e8288284 /azalea-client/src | |
| parent | 9c6e40051dadeaa67df0acabee003e4a0286f5f1 (diff) | |
| download | azalea-drasl-89564da6b1ed2b424a4649d230a694b425e015cb.tar.xz | |
fix DataComponentPatch::get
Diffstat (limited to 'azalea-client/src')
| -rw-r--r-- | azalea-client/src/entity_query.rs | 10 |
1 files changed, 9 insertions, 1 deletions
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<Player>, Without<LocalEntity>), ()>(|_: &()| true); + /// # } + /// ``` pub fn nearest_entities_by<F: QueryFilter, Q: QueryData>( &self, predicate: impl EntityPredicate<Q, F>, |
