diff options
| author | mat <git@matdoes.dev> | 2025-12-28 09:06:47 -0330 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-12-28 09:06:47 -0330 |
| commit | 839d536e8020b291bc1d213a5e8e823dc513a940 (patch) | |
| tree | 60cab8b908ad53af0126e2cb1dec670d073936a3 /azalea/src/client_impl/movement.rs | |
| parent | 5b1a78baf757897532be8c308a37c99fb2ca3352 (diff) | |
| download | azalea-drasl-839d536e8020b291bc1d213a5e8e823dc513a940.tar.xz | |
add a few more functions for getting common components to Client
Diffstat (limited to 'azalea/src/client_impl/movement.rs')
| -rw-r--r-- | azalea/src/client_impl/movement.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/azalea/src/client_impl/movement.rs b/azalea/src/client_impl/movement.rs index a708e5f6..6532997d 100644 --- a/azalea/src/client_impl/movement.rs +++ b/azalea/src/client_impl/movement.rs @@ -48,9 +48,8 @@ impl Client { /// Returns the direction the client is looking. /// /// See [`Self::set_direction`] for more details. - pub fn direction(&self) -> (f32, f32) { - let look_direction = *self.component::<LookDirection>(); - (look_direction.y_rot(), look_direction.x_rot()) + pub fn direction(&self) -> LookDirection { + *self.component::<LookDirection>() } /// Start walking in the given direction. |
