diff options
| author | mat <github@matdoes.dev> | 2022-05-07 18:47:16 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-05-07 18:47:16 -0500 |
| commit | 0b84e1cbb826f1a502ffc81efc000369a3c5bb85 (patch) | |
| tree | 3457bd76cb2b52f9df8382a436a8716c3a251615 /azalea-protocol/src | |
| parent | 1a15d36e6b9bb33340f1422b6b282dd13e9b4840 (diff) | |
| download | azalea-drasl-0b84e1cbb826f1a502ffc81efc000369a3c5bb85.tar.xz | |
add a couple more packets
Diffstat (limited to 'azalea-protocol/src')
3 files changed, 27 insertions, 0 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_set_experience_packet.rs b/azalea-protocol/src/packets/game/clientbound_set_experience_packet.rs new file mode 100644 index 00000000..88c306dc --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_set_experience_packet.rs @@ -0,0 +1,10 @@ +use packet_macros::GamePacket; + +#[derive(Clone, Debug, GamePacket)] +pub struct ClientboundSetExperiencePacket { + pub experience_progress: f32, + #[var] + pub experience_level: u32, + #[var] + pub total_experience: u32, +} diff --git a/azalea-protocol/src/packets/game/clientbound_teleport_entity_packet.rs b/azalea-protocol/src/packets/game/clientbound_teleport_entity_packet.rs new file mode 100644 index 00000000..ea8788d6 --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_teleport_entity_packet.rs @@ -0,0 +1,13 @@ +use packet_macros::GamePacket; + +#[derive(Clone, Debug, GamePacket)] +pub struct ClientboundTeleportEntityPacket { + #[var] + pub id: u32, + pub x: f64, + pub y: f64, + pub z: f64, + 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 776c5d41..d3ea7281 100755 --- a/azalea-protocol/src/packets/game/mod.rs +++ b/azalea-protocol/src/packets/game/mod.rs @@ -21,8 +21,10 @@ pub mod clientbound_set_chunk_cache_center; pub mod clientbound_set_default_spawn_position_packet; pub mod clientbound_set_entity_data_packet; pub mod clientbound_set_entity_link_packet; +pub mod clientbound_set_experience_packet; pub mod clientbound_set_health_packet; pub mod clientbound_set_time_packet; +pub mod clientbound_teleport_entity_packet; pub mod clientbound_update_attributes_packet; pub mod clientbound_update_recipes_packet; pub mod clientbound_update_tags_packet; @@ -61,8 +63,10 @@ declare_state_packets!( 0x4d: clientbound_set_entity_data_packet::ClientboundSetEntityDataPacket, 0x45: clientbound_set_entity_link_packet::ClientboundSetEntityLinkPacket, 0x4f: clientbound_entity_velocity_packet::ClientboundEntityVelocityPacket, + 0x51: clientbound_set_experience_packet::ClientboundSetExperiencePacket, 0x52: clientbound_set_health_packet::ClientboundSetHealthPacket, 0x59: clientbound_set_time_packet::ClientboundSetTimePacket, + 0x62: clientbound_teleport_entity_packet::ClientboundTeleportEntityPacket, 0x64: clientbound_update_attributes_packet::ClientboundUpdateAttributesPacket, 0x66: clientbound_update_recipes_packet::ClientboundUpdateRecipesPacket, 0x67: clientbound_update_tags_packet::ClientboundUpdateTagsPacket, |
