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