From ee2575794e91b9457a74a95daf1dcc707058cd58 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 12 Oct 2025 23:01:54 +0300 Subject: upgrade deps and clean up lots of doc comments --- azalea-entity/src/plugin/indexing.rs | 7 ++++--- azalea-entity/src/plugin/mod.rs | 16 +++++++++++----- azalea-entity/src/plugin/relative_updates.rs | 10 ++++------ 3 files changed, 19 insertions(+), 14 deletions(-) (limited to 'azalea-entity/src/plugin') diff --git a/azalea-entity/src/plugin/indexing.rs b/azalea-entity/src/plugin/indexing.rs index f1926286..6f170dc6 100644 --- a/azalea-entity/src/plugin/indexing.rs +++ b/azalea-entity/src/plugin/indexing.rs @@ -45,9 +45,10 @@ impl EntityUuidIndex { } } -/// An index of Minecraft entity IDs to Azalea ECS entities. This is a -/// `Component` so local players can keep track of entity IDs independently from -/// the instance. +/// An index of Minecraft entity IDs to Azalea ECS entities. +/// +/// This is a `Component` so local players can keep track of entity IDs +/// independently from the instance. /// /// If you need a per-instance instead of per-client version of this, you can /// use [`Instance::entity_by_id`]. diff --git a/azalea-entity/src/plugin/mod.rs b/azalea-entity/src/plugin/mod.rs index e20ed860..a3ea11d0 100644 --- a/azalea-entity/src/plugin/mod.rs +++ b/azalea-entity/src/plugin/mod.rs @@ -80,8 +80,9 @@ fn debug_new_entity(query: Query<(Entity, Option<&LocalEntity>), Added>) { @@ -188,7 +189,9 @@ fn is_trapdoor_useable_as_ladder( } /// A component that lists all the local player entities that have this entity -/// loaded. If this is empty, the entity will be removed from the ECS. +/// loaded. +/// +/// If this is empty, the entity will be removed from the ECS. #[derive(Component, Clone, Deref, DerefMut)] pub struct LoadedBy(pub HashSet); @@ -203,10 +206,13 @@ pub fn apply_clamp_look_direction(mut look_direction: LookDirection) -> LookDire look_direction } -/// Sets the position of the entity. This doesn't update the cache in -/// azalea-world, and should only be used within azalea-world! +/// Sets the position of the entity. +/// +/// This doesn't update the cache in azalea-world, and should only be used +/// within azalea-world. /// /// # Safety +/// /// Cached position in the world must be updated. #[allow(clippy::type_complexity)] pub fn update_bounding_box( diff --git a/azalea-entity/src/plugin/relative_updates.rs b/azalea-entity/src/plugin/relative_updates.rs index 1c0a899f..3917c946 100644 --- a/azalea-entity/src/plugin/relative_updates.rs +++ b/azalea-entity/src/plugin/relative_updates.rs @@ -54,6 +54,7 @@ impl RelativeEntityUpdate { } /// A component that counts the number of times this entity has been modified. +/// /// This is used for making sure two clients don't do the same relative update /// on an entity. /// @@ -102,15 +103,12 @@ impl EntityCommand for RelativeEntityUpdate { } } -/// The [`UpdatesReceived`] component should never be on [`LocalEntity`] -/// entities. This warns if an entity has both components. +/// A system that logs a warning if an entity has both [`UpdatesReceived`] +/// and [`LocalEntity`]. pub fn debug_detect_updates_received_on_local_entities( query: Query, With)>, ) { for entity in &query { - warn!( - "Entity {:?} has both LocalEntity and UpdatesReceived", - entity - ); + warn!("Entity {entity:?} has both LocalEntity and UpdatesReceived"); } } -- cgit v1.2.3