diff options
| author | mat <github@matdoes.dev> | 2022-04-30 22:13:47 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-04-30 22:13:47 -0500 |
| commit | f2a8e8221d9de6e76721d3c947ba9f1ab7c3c90d (patch) | |
| tree | ac975f5b640039a63a27dfe5ec58f944833894f0 /azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs | |
| parent | 80d49a76073d417e118b85636df2a923043b0250 (diff) | |
| download | azalea-drasl-f2a8e8221d9de6e76721d3c947ba9f1ab7c3c90d.tar.xz | |
add clientbound_add_entity_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.rs | 26 |
1 files changed, 26 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..ad948922 --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs @@ -0,0 +1,26 @@ +use crate::mc_buf::UnsizedByteArray; +use azalea_core::resource_location::ResourceLocation; +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 data: i8, + /// X acceleration + pub xa: u16, + /// Y acceleration + pub ya: u16, + /// Z acceleration + pub za: u16, +} |
