aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-03-16 04:34:32 +0000
committermat <git@matdoes.dev>2025-03-16 04:34:32 +0000
commit5f5616145b03e457d1b0dd7cc7d5ac41dd5b190c (patch)
tree88fd1441cc5c0f1a3667b477023b67df95a863a9 /azalea-protocol
parentd6a4d9134724aeabb1521ce7ee1958eba3260c0d (diff)
downloadazalea-drasl-5f5616145b03e457d1b0dd7cc7d5ac41dd5b190c.tar.xz
document ClientboundAddEntity::data
Diffstat (limited to 'azalea-protocol')
-rwxr-xr-xazalea-protocol/src/packets/game/c_add_entity.rs10
1 files changed, 9 insertions, 1 deletions
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,