aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-03-20 01:49:15 +0000
committermat <git@matdoes.dev>2025-03-20 01:49:15 +0000
commit13d5cbed1fed1695c28dc1bf1c11b24c68819970 (patch)
treef0173a37595e73d1a8c92b6a20306056778252d9 /azalea-client/src
parent75efbc83fdc4a47f880e95259a339d41839af01a (diff)
downloadazalea-drasl-13d5cbed1fed1695c28dc1bf1c11b24c68819970.tar.xz
document Position default
Diffstat (limited to 'azalea-client/src')
-rw-r--r--azalea-client/src/client.rs4
-rw-r--r--azalea-client/src/plugins/packet/game/mod.rs2
2 files changed, 5 insertions, 1 deletions
diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs
index 840d373d..05c529b8 100644
--- a/azalea-client/src/client.rs
+++ b/azalea-client/src/client.rs
@@ -683,6 +683,10 @@ impl Client {
/// Get the position of this client.
///
/// This is a shortcut for `Vec3::from(&bot.component::<Position>())`.
+ ///
+ /// Note that this value is given a default of [`Vec3::ZERO`] when it
+ /// receives the login packet, its true position may be set ticks
+ /// later.
pub fn position(&self) -> Vec3 {
Vec3::from(&self.component::<Position>())
}
diff --git a/azalea-client/src/plugins/packet/game/mod.rs b/azalea-client/src/plugins/packet/game/mod.rs
index ed8c62ea..42aa0f9b 100644
--- a/azalea-client/src/plugins/packet/game/mod.rs
+++ b/azalea-client/src/plugins/packet/game/mod.rs
@@ -297,7 +297,7 @@ impl GamePacketHandler<'_> {
let entity_bundle = EntityBundle::new(
game_profile.uuid,
- Vec3::default(),
+ Vec3::ZERO,
azalea_registry::EntityKind::Player,
new_instance_name,
);