diff options
Diffstat (limited to 'azalea-protocol/src/packets')
| -rwxr-xr-x | azalea-protocol/src/packets/game/c_entity_position_sync.rs | 11 | ||||
| -rwxr-xr-x | azalea-protocol/src/packets/game/c_player_position.rs | 8 |
2 files changed, 8 insertions, 11 deletions
diff --git a/azalea-protocol/src/packets/game/c_entity_position_sync.rs b/azalea-protocol/src/packets/game/c_entity_position_sync.rs index c5cde322..6347ec5e 100755 --- a/azalea-protocol/src/packets/game/c_entity_position_sync.rs +++ b/azalea-protocol/src/packets/game/c_entity_position_sync.rs @@ -1,7 +1,8 @@ use azalea_buf::AzBuf; -use azalea_core::position::Vec3; use azalea_protocol_macros::ClientboundGamePacket; +use super::c_player_position::PositionMoveRotation; + #[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundEntityPositionSync { #[var] @@ -9,11 +10,3 @@ pub struct ClientboundEntityPositionSync { pub values: PositionMoveRotation, pub on_ground: bool, } - -#[derive(AzBuf, Clone, Debug)] -pub struct PositionMoveRotation { - pub position: Vec3, - pub delta_movement: Vec3, - pub y_rot: f32, - pub x_rot: f32, -} 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)] |
