aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/local_player.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-10-12 23:01:54 +0300
committermat <git@matdoes.dev>2025-10-12 23:01:54 +0300
commitee2575794e91b9457a74a95daf1dcc707058cd58 (patch)
treedf725850ef18ded5ce3f6552e17095d0f704ae84 /azalea-client/src/local_player.rs
parent1a1402954b07cd77615d0afc026c73b008787f51 (diff)
downloadazalea-drasl-ee2575794e91b9457a74a95daf1dcc707058cd58.tar.xz
upgrade deps and clean up lots of doc comments
Diffstat (limited to 'azalea-client/src/local_player.rs')
-rw-r--r--azalea-client/src/local_player.rs19
1 files changed, 11 insertions, 8 deletions
diff --git a/azalea-client/src/local_player.rs b/azalea-client/src/local_player.rs
index 20da4c80..4bc69995 100644
--- a/azalea-client/src/local_player.rs
+++ b/azalea-client/src/local_player.rs
@@ -26,11 +26,12 @@ use crate::{ClientInformation, events::Event as AzaleaEvent, player::PlayerInfo}
/// [`InstanceName`]: azalea_world::InstanceName
#[derive(Component, Clone)]
pub struct InstanceHolder {
- /// The partial instance is the world this client currently has loaded. It
- /// has a limited render distance.
+ /// The partial instance is the world this client currently has loaded.
+ ///
+ /// It has a limited render distance.
pub partial_instance: Arc<RwLock<PartialInstance>>,
- /// The world is the combined [`PartialInstance`]s of all clients in the
- /// same world.
+ /// The combined [`PartialInstance`]s of all clients in the same instance
+ /// (aka world/dimension).
///
/// This is only relevant if you're using a shared world (i.e. a
/// swarm).
@@ -81,11 +82,13 @@ pub struct TabList(HashMap<Uuid, PlayerInfo>);
#[derive(Component, Clone)]
pub struct Hunger {
- /// The main hunger bar. Goes from 0 to 20.
+ /// The main hunger bar. This is typically in the range `0..=20`.
pub food: u32,
- /// The amount of saturation the player has. This isn't shown in normal
- /// vanilla clients but it's a separate counter that makes it so your hunger
- /// only starts decreasing when this is 0.
+ /// The amount of saturation the player has.
+ ///
+ /// This isn't displayed in the vanilla Minecraft GUI, but it's used
+ /// internally by the game. It's a decrementing counter, and the player's
+ /// [`Hunger::food`] only starts decreasing when this reaches 0.
pub saturation: f32,
}