From 2b9c453ade60bf4a37e2d77059641dc81b011be0 Mon Sep 17 00:00:00 2001 From: eihqnh <40905037+eihqnh@users.noreply.github.com> Date: Sun, 5 Oct 2025 02:25:01 +0800 Subject: fix(inventory): update 1.21.9 entity and block entity component structures (#260) --- azalea-inventory/src/components.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'azalea-inventory/src/components.rs') diff --git a/azalea-inventory/src/components.rs b/azalea-inventory/src/components.rs index ad15a461..b820afc9 100644 --- a/azalea-inventory/src/components.rs +++ b/azalea-inventory/src/components.rs @@ -731,9 +731,11 @@ pub struct DebugStickState { } #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] -#[serde(transparent)] pub struct EntityData { - pub entity: NbtCompound, + #[serde(rename = "id")] + pub kind: EntityKind, + #[serde(flatten)] + pub data: NbtCompound, } #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] @@ -743,9 +745,11 @@ pub struct BucketEntityData { } #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] -#[serde(transparent)] pub struct BlockEntityData { - pub entity: NbtCompound, + #[serde(rename = "id")] + pub kind: EntityKind, + #[serde(flatten)] + pub data: NbtCompound, } #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] -- cgit v1.2.3