diff --git a/crates/horizon-client/src/entity_nbt.rs b/crates/horizon-client/src/entity_nbt.rs index b2a3eaebec..b13483c454 100644 --- a/crates/horizon-client/src/entity_nbt.rs +++ b/crates/horizon-client/src/entity_nbt.rs @@ -2380,6 +2380,14 @@ pub fn evoker_fangs_to_nbt( tag } +/// `UUIDUtil.CODEC` via `NbtOps.getIntStream`: boxed Number conversions, +/// with the first-four partial value retained by `TagValueInput.read`. +fn item_uuid_from_tag(tag: Option<&Tag>) -> Option<[i32; 4]> { + let values = horizon_world::datafix::dynamic::as_int_stream(tag)?; + values.get(..4)?.try_into().ok() +} + +/// `ItemEntity.readAdditionalSaveData`: Owner and Thrower use the numeric UUID codec. pub fn item_entity_from_nbt(tag: &Tag, id: u32, bob_offset: f32) -> Option { let stack = item_from_nbt(tag.get("Item")?)?; let position = position(tag)?; @@ -2391,8 +2399,8 @@ pub fn item_entity_from_nbt(tag: &Tag, id: u32, bob_offset: f32) -> Option