chunkedge_protocol/packets/play/add_entity_s2c.rs
1use chunkedge_binary::{Decode, Encode, VarInt};
2use chunkedge_math::DVec3;
3use uuid::Uuid;
4
5use crate::{ByteAngle, Packet, Velocity};
6
7/// Sent by the server when a vehicle or other non-living entity is created.
8///
9/// wiki : [Spawn Entity](https://wiki.vg/Protocol#Spawn_Experience_Orb)
10#[derive(Copy, Clone, Debug, Encode, Decode, Packet)]
11pub struct AddEntityS2c {
12 pub entity_id: VarInt,
13 pub object_uuid: Uuid,
14 pub kind: VarInt, // TODO: EntityKind in chunkedge_generated?
15 pub position: DVec3,
16 pub pitch: ByteAngle,
17 pub yaw: ByteAngle,
18 pub head_yaw: ByteAngle,
19 pub data: VarInt,
20 pub velocity: Velocity,
21}