diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2024-12-11 19:51:12 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-11 19:51:12 -0600 |
| commit | e9136c9cbbf9010b8352127e129c1cd290f377bd (patch) | |
| tree | db83316a273153106dd3b343c9d6d4fce234d132 /azalea-protocol/src/packets/game/c_player_position.rs | |
| parent | 23932003d98db0f5f976146aa9a11e5d04a74695 (diff) | |
| download | azalea-drasl-e9136c9cbbf9010b8352127e129c1cd290f377bd.tar.xz | |
Implement EntityPositionSync (#196)
* implement EntityPositionSync
* fix EntityPositionSync setting the wrong vec_delta_codec and also move into a RelativeEntityUpdate
Diffstat (limited to 'azalea-protocol/src/packets/game/c_player_position.rs')
| -rwxr-xr-x | azalea-protocol/src/packets/game/c_player_position.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/azalea-protocol/src/packets/game/c_player_position.rs b/azalea-protocol/src/packets/game/c_player_position.rs index c6a2e3f9..8d19ce36 100755 --- a/azalea-protocol/src/packets/game/c_player_position.rs +++ b/azalea-protocol/src/packets/game/c_player_position.rs @@ -2,6 +2,7 @@ use std::io::{Cursor, Write}; use azalea_buf::{AzBuf, AzaleaRead, AzaleaWrite, BufReadError}; use azalea_core::{bitset::FixedBitSet, position::Vec3}; +use azalea_entity::LookDirection; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] @@ -18,9 +19,12 @@ pub struct ClientboundPlayerPosition { pub struct PositionMoveRotation { pub pos: Vec3, /// The updated delta movement (velocity). + /// + /// This is unused when included in a [`ClientboundEntityPositionSync`]. + /// + /// [`ClientboundEntityPositionSync`]: super::c_entity_position_sync::ClientboundEntityPositionSync pub delta: Vec3, - pub y_rot: f32, - pub x_rot: f32, + pub look_direction: LookDirection, } #[derive(Debug, Clone)] |
