aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-05-01 13:51:59 -0500
committermat <github@matdoes.dev>2022-05-01 13:51:59 -0500
commit9dacd90abcfaa62ade1e4f130ed53da2c9facdbc (patch)
tree68a4956399a6d509a5d8ae790235996a5a24024e /azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs
parent4b1cfd1cf899fbbc3de8f72cbb160695c1e9ae70 (diff)
downloadazalea-drasl-9dacd90abcfaa62ade1e4f130ed53da2c9facdbc.tar.xz
clientbound_add_entity_packet & clientbound_set_entity_data_packet
Diffstat (limited to 'azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs')
-rw-r--r--azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs b/azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs
new file mode 100644
index 00000000..f45e71c9
--- /dev/null
+++ b/azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs
@@ -0,0 +1,22 @@
+use packet_macros::GamePacket;
+use uuid::Uuid;
+
+#[derive(Clone, Debug, GamePacket)]
+pub struct ClientboundAddEntityPacket {
+ #[varint]
+ pub id: i32,
+ pub uuid: Uuid,
+ // TODO: have an entity type struct
+ #[varint]
+ pub entity_type: i32,
+ pub x: f64,
+ pub y: f64,
+ pub z: f64,
+ pub x_rot: i8,
+ pub y_rot: i8,
+ // pub y_head_rot: i8,
+ pub data: i32,
+ pub x_vel: u16,
+ pub y_vel: u16,
+ pub z_vel: u16,
+}