From 5f5616145b03e457d1b0dd7cc7d5ac41dd5b190c Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 16 Mar 2025 04:34:32 +0000 Subject: [PATCH] document ClientboundAddEntity::data --- azalea-protocol/src/packets/game/c_add_entity.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/azalea-protocol/src/packets/game/c_add_entity.rs b/azalea-protocol/src/packets/game/c_add_entity.rs index 28f86a3e..008d6d28 100755 --- a/azalea-protocol/src/packets/game/c_add_entity.rs +++ b/azalea-protocol/src/packets/game/c_add_entity.rs @@ -1,6 +1,6 @@ use azalea_buf::AzBuf; use azalea_core::{delta::PositionDelta8, position::Vec3, resource_location::ResourceLocation}; -use azalea_entity::{metadata::apply_default_metadata, EntityBundle}; +use azalea_entity::{EntityBundle, metadata::apply_default_metadata}; use azalea_protocol_macros::ClientboundGamePacket; use azalea_world::MinecraftEntityId; use uuid::Uuid; @@ -16,6 +16,14 @@ pub struct ClientboundAddEntity { pub x_rot: i8, pub y_rot: i8, pub y_head_rot: i8, + /// The entity's "object data". This is unused for most entities. + /// + /// Projectiles and fishing hooks treat this as an entity ID, which you're + /// encouraged to use [`MinecraftEntityId::from`] for. Other entities may + /// treat it as a block state or enum variant. + /// + /// See [the wiki](https://minecraft.wiki/w/Minecraft_Wiki:Projects/wiki.vg_merge/Object_Data) + /// for more information about this field. #[var] pub data: u32, pub velocity: PositionDelta8,