From 79bf5771303c70115cba09ac55c7b7a2d3e32091 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 7 May 2022 11:22:03 -0500 Subject: clientbound add player packet --- .../src/packets/game/clientbound_add_player_packet.rs | 14 ++++++++++++++ azalea-protocol/src/packets/game/mod.rs | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 azalea-protocol/src/packets/game/clientbound_add_player_packet.rs (limited to 'azalea-protocol/src/packets') diff --git a/azalea-protocol/src/packets/game/clientbound_add_player_packet.rs b/azalea-protocol/src/packets/game/clientbound_add_player_packet.rs new file mode 100644 index 00000000..9fe086cb --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_add_player_packet.rs @@ -0,0 +1,14 @@ +use packet_macros::GamePacket; +use uuid::Uuid; + +#[derive(Clone, Debug, GamePacket)] +pub struct ClientboundAddPlayerPacket { + #[varint] + pub id: i32, + pub uuid: Uuid, + pub x: f64, + pub y: f64, + pub z: f64, + pub x_rot: i8, + pub y_rot: i8, +} diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs index bdba6d2b..81980723 100755 --- a/azalea-protocol/src/packets/game/mod.rs +++ b/azalea-protocol/src/packets/game/mod.rs @@ -1,5 +1,6 @@ pub mod clientbound_add_entity_packet; pub mod clientbound_add_mob_packet; +pub mod clientbound_add_player_packet; pub mod clientbound_change_difficulty_packet; pub mod clientbound_custom_payload_packet; pub mod clientbound_declare_commands_packet; @@ -33,6 +34,7 @@ declare_state_packets!( Clientbound => { 0x00: clientbound_add_entity_packet::ClientboundAddEntityPacket, 0x02: clientbound_add_mob_packet::ClientboundAddMobPacket, + 0x04: clientbound_add_player_packet::ClientboundAddPlayerPacket, 0x0e: clientbound_change_difficulty_packet::ClientboundChangeDifficultyPacket, 0x12: clientbound_declare_commands_packet::ClientboundDeclareCommandsPacket, 0x1a: clientbound_disconnect_packet::ClientboundDisconnectPacket, -- cgit v1.2.3