diff options
| author | eihqnh <40905037+eihqnh@users.noreply.github.com> | 2025-10-05 02:25:01 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-04 13:25:01 -0500 |
| commit | 2b9c453ade60bf4a37e2d77059641dc81b011be0 (patch) | |
| tree | 0b6d83e6b632842a8cb40e1aa14a5dac8d85bbe6 /azalea-inventory/src/components.rs | |
| parent | 43f20b821ce26af148156e705f4c1fd3f956beb5 (diff) | |
| download | azalea-drasl-2b9c453ade60bf4a37e2d77059641dc81b011be0.tar.xz | |
fix(inventory): update 1.21.9 entity and block entity component structures (#260)
Diffstat (limited to 'azalea-inventory/src/components.rs')
| -rw-r--r-- | azalea-inventory/src/components.rs | 12 |
1 files changed, 8 insertions, 4 deletions
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)] |
