aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-05-07 20:00:59 -0500
committermat <github@matdoes.dev>2022-05-07 20:00:59 -0500
commitd8049a5d0c9a2c79d576785dc1681ae60e44a04b (patch)
tree585e7a3bd0c8535c7cf3e9f2999c132878961b53 /azalea-protocol/src
parente53ef8b0ddd46b3a85e597e7da57139960304e35 (diff)
downloadazalea-drasl-d8049a5d0c9a2c79d576785dc1681ae60e44a04b.tar.xz
move entity and rotate head packets
Diffstat (limited to 'azalea-protocol/src')
-rw-r--r--azalea-protocol/src/packets/game/clientbound_move_entity_packet.rs11
-rw-r--r--azalea-protocol/src/packets/game/clientbound_rotate_head_packet.rs8
-rwxr-xr-xazalea-protocol/src/packets/game/mod.rs4
3 files changed, 23 insertions, 0 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
new file mode 100644
index 00000000..285a45a4
--- /dev/null
+++ b/azalea-protocol/src/packets/game/clientbound_move_entity_packet.rs
@@ -0,0 +1,11 @@
+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_rotate_head_packet.rs b/azalea-protocol/src/packets/game/clientbound_rotate_head_packet.rs
new file mode 100644
index 00000000..d423885d
--- /dev/null
+++ b/azalea-protocol/src/packets/game/clientbound_rotate_head_packet.rs
@@ -0,0 +1,8 @@
+use packet_macros::GamePacket;
+
+#[derive(Clone, Debug, GamePacket)]
+pub struct ClientboundRotateHeadPacket {
+ #[var]
+ pub entity_id: u32,
+ pub y_head_rot: i8,
+}
diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs
index db1c0b11..0f7d00d0 100755
--- a/azalea-protocol/src/packets/game/mod.rs
+++ b/azalea-protocol/src/packets/game/mod.rs
@@ -12,10 +12,12 @@ 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_player_abilities_packet;
pub mod clientbound_player_info_packet;
pub mod clientbound_player_position_packet;
pub mod clientbound_recipe_packet;
+pub mod clientbound_rotate_head_packet;
pub mod clientbound_set_carried_item_packet;
pub mod clientbound_set_chunk_cache_center;
pub mod clientbound_set_default_spawn_position_packet;
@@ -53,10 +55,12 @@ 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,
0x32: clientbound_player_abilities_packet::ClientboundPlayerAbilitiesPacket,
0x36: clientbound_player_info_packet::ClientboundPlayerInfoPacket,
0x38: clientbound_player_position_packet::ClientboundPlayerPositionPacket,
0x39: clientbound_recipe_packet::ClientboundRecipePacket,
+ 0x3e: clientbound_rotate_head_packet::ClientboundRotateHeadPacket,
0x48: clientbound_set_carried_item_packet::ClientboundSetCarriedItemPacket,
0x49: clientbound_set_chunk_cache_center::ClientboundSetChunkCacheCenterPacket,
0x4a: clientbound_update_view_distance_packet::ClientboundUpdateViewDistancePacket,