aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/client.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-client/src/client.rs')
-rw-r--r--azalea-client/src/client.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs
index 05c529b8..f18de86d 100644
--- a/azalea-client/src/client.rs
+++ b/azalea-client/src/client.rs
@@ -688,7 +688,11 @@ impl Client {
/// receives the login packet, its true position may be set ticks
/// later.
pub fn position(&self) -> Vec3 {
- Vec3::from(&self.component::<Position>())
+ Vec3::from(
+ &self
+ .get_component::<Position>()
+ .expect("the client's position hasn't been initialized yet"),
+ )
}
/// Get the position of this client's eyes.