diff --git a/azalea-client/src/connect.rs b/azalea-client/src/connect.rs index 0fc7273b..f04eb25d 100755 --- a/azalea-client/src/connect.rs +++ b/azalea-client/src/connect.rs @@ -250,7 +250,7 @@ impl Client { // println!("Got update attributes packet {:?}", p); } GamePacket::ClientboundEntityVelocityPacket(p) => { - println!("Got entity velocity packet {:?}", p); + // println!("Got entity velocity packet {:?}", p); } GamePacket::ClientboundSetEntityLinkPacket(p) => { println!("Got set entity link packet {:?}", p); @@ -283,10 +283,16 @@ impl Client { println!("Got update advancements packet {:?}", p); } GamePacket::ClientboundRotateHeadPacket(p) => { - println!("Got rotate head packet {:?}", p); + // println!("Got rotate head packet {:?}", p); } - GamePacket::ClientboundMoveEntityPacket(p) => { - println!("Got move entity packet {:?}", p); + GamePacket::ClientboundMoveEntityPosPacket(p) => { + // println!("Got move entity pos packet {:?}", p); + } + GamePacket::ClientboundMoveEntityPosRotPacket(p) => { + // println!("Got move entity pos rot packet {:?}", p); + } + GamePacket::ClientboundMoveEntityRotPacket(p) => { + println!("Got move entity rot packet {:?}", p); } _ => panic!("Unexpected packet {:?}", packet), } 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,