diff options
| author | mat <github@matdoes.dev> | 2022-05-07 20:34:53 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-05-07 20:34:53 -0500 |
| commit | 49454781cf02c85e065cf1cf4de22701175f3f13 (patch) | |
| tree | 6af09cf725016a50e1a5dfd2ef7d64629f5a8160 /azalea-protocol | |
| parent | d8049a5d0c9a2c79d576785dc1681ae60e44a04b (diff) | |
| download | azalea-drasl-49454781cf02c85e065cf1cf4de22701175f3f13.tar.xz | |
add move packets
Diffstat (limited to 'azalea-protocol')
5 files changed, 40 insertions, 13 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_move_entity_packet.rs b/azalea-protocol/src/packets/game/clientbound_move_entity_packet.rs deleted file mode 100644 index 285a45a4..00000000 --- a/azalea-protocol/src/packets/game/clientbound_move_entity_packet.rs +++ /dev/null @@ -1,11 +0,0 @@ -use packet_macros::GamePacket; - -#[derive(Clone, Debug, GamePacket)] -pub struct ClientboundMoveEntityPacket { - #[var] - pub entity_id: u32, - pub y_rot: i16, - pub x_rot: i16, - pub z_rot: i16, - pub on_ground: bool, -} diff --git a/azalea-protocol/src/packets/game/clientbound_move_entity_pos_packet.rs b/azalea-protocol/src/packets/game/clientbound_move_entity_pos_packet.rs new file mode 100644 index 00000000..c9aff7cb --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_move_entity_pos_packet.rs @@ -0,0 +1,11 @@ +use packet_macros::GamePacket; + +#[derive(Clone, Debug, GamePacket)] +pub struct ClientboundMoveEntityPosPacket { + #[var] + pub entity_id: i32, + pub xa: i16, + pub ya: i16, + pub za: i16, + pub on_ground: bool, +} diff --git a/azalea-protocol/src/packets/game/clientbound_move_entity_posrot_packet.rs b/azalea-protocol/src/packets/game/clientbound_move_entity_posrot_packet.rs new file mode 100644 index 00000000..645912e7 --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_move_entity_posrot_packet.rs @@ -0,0 +1,13 @@ +use packet_macros::GamePacket; + +#[derive(Clone, Debug, GamePacket)] +pub struct ClientboundMoveEntityPosRotPacket { + #[var] + pub entity_id: i32, + pub xa: i16, + pub ya: i16, + pub za: i16, + pub y_rot: i8, + pub x_rot: i8, + pub on_ground: bool, +} diff --git a/azalea-protocol/src/packets/game/clientbound_move_entity_rot_packet.rs b/azalea-protocol/src/packets/game/clientbound_move_entity_rot_packet.rs new file mode 100644 index 00000000..6ce0faa9 --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_move_entity_rot_packet.rs @@ -0,0 +1,10 @@ +use packet_macros::GamePacket; + +#[derive(Clone, Debug, GamePacket)] +pub struct ClientboundMoveEntityRotPacket { + #[var] + pub entity_id: i32, + pub y_rot: i8, + pub x_rot: i8, + pub on_ground: bool, +} diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs index 0f7d00d0..78091788 100755 --- a/azalea-protocol/src/packets/game/mod.rs +++ b/azalea-protocol/src/packets/game/mod.rs @@ -12,7 +12,9 @@ pub mod clientbound_initialize_border_packet; pub mod clientbound_level_chunk_with_light_packet; pub mod clientbound_light_update_packet; pub mod clientbound_login_packet; -pub mod clientbound_move_entity_packet; +pub mod clientbound_move_entity_pos_packet; +pub mod clientbound_move_entity_posrot_packet; +pub mod clientbound_move_entity_rot_packet; pub mod clientbound_player_abilities_packet; pub mod clientbound_player_info_packet; pub mod clientbound_player_position_packet; @@ -55,7 +57,9 @@ declare_state_packets!( 0x22: clientbound_level_chunk_with_light_packet::ClientboundLevelChunkWithLightPacket, 0x25: clientbound_light_update_packet::ClientboundLightUpdatePacket, 0x26: clientbound_login_packet::ClientboundLoginPacket, - 0x29: clientbound_move_entity_packet::ClientboundMoveEntityPacket, + 0x29: clientbound_move_entity_pos_packet::ClientboundMoveEntityPosPacket, + 0x2a: clientbound_move_entity_posrot_packet::ClientboundMoveEntityPosRotPacket, + 0x2b: clientbound_move_entity_rot_packet::ClientboundMoveEntityRotPacket, 0x32: clientbound_player_abilities_packet::ClientboundPlayerAbilitiesPacket, 0x36: clientbound_player_info_packet::ClientboundPlayerInfoPacket, 0x38: clientbound_player_position_packet::ClientboundPlayerPositionPacket, |
