From 2c610826fc9f8e16897f52313faa8e0602d1dc3d Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Sun, 19 Nov 2023 22:07:38 -0600 Subject: Replace azalea-nbt with simdnbt (#111) * delete azalea-nbt and replace with simdnbt * use simdnbt from crates.io * remove serde dependency on azalea-registry --- azalea-entity/Cargo.toml | 2 +- azalea-entity/src/data.rs | 2 +- azalea-entity/src/metadata.rs | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'azalea-entity') diff --git a/azalea-entity/Cargo.toml b/azalea-entity/Cargo.toml index 4399ddf3..7cdf5343 100644 --- a/azalea-entity/Cargo.toml +++ b/azalea-entity/Cargo.toml @@ -14,7 +14,7 @@ azalea-buf = { version = "0.8.0", path = "../azalea-buf" } azalea-chat = { version = "0.8.0", path = "../azalea-chat" } azalea-core = { version = "0.8.0", path = "../azalea-core" } azalea-inventory = { version = "0.8.0", path = "../azalea-inventory" } -azalea-nbt = { version = "0.8.0", path = "../azalea-nbt" } +simdnbt = { version = "0.2.1" } azalea-registry = { version = "0.8.0", path = "../azalea-registry" } azalea-world = { version = "0.8.0", path = "../azalea-world" } bevy_app = "0.12.0" diff --git a/azalea-entity/src/data.rs b/azalea-entity/src/data.rs index 54487ef1..83779b21 100755 --- a/azalea-entity/src/data.rs +++ b/azalea-entity/src/data.rs @@ -81,7 +81,7 @@ pub enum EntityDataValue { BlockState(azalea_block::BlockState), /// If this is air, that means it's absent, OptionalBlockState(azalea_block::BlockState), - CompoundTag(azalea_nbt::Nbt), + CompoundTag(simdnbt::owned::NbtCompound), Particle(Particle), VillagerData(VillagerData), // 0 for absent; 1 + actual value otherwise. Used for entity IDs. diff --git a/azalea-entity/src/metadata.rs b/azalea-entity/src/metadata.rs index 39ba9527..006020d1 100644 --- a/azalea-entity/src/metadata.rs +++ b/azalea-entity/src/metadata.rs @@ -6054,9 +6054,9 @@ pub struct PlayerModeCustomisation(pub u8); #[derive(Component, Deref, DerefMut, Clone)] pub struct PlayerMainHand(pub u8); #[derive(Component, Deref, DerefMut, Clone)] -pub struct ShoulderLeft(pub azalea_nbt::Nbt); +pub struct ShoulderLeft(pub simdnbt::owned::NbtCompound); #[derive(Component, Deref, DerefMut, Clone)] -pub struct ShoulderRight(pub azalea_nbt::Nbt); +pub struct ShoulderRight(pub simdnbt::owned::NbtCompound); #[derive(Component)] pub struct Player; impl Player { @@ -6137,8 +6137,8 @@ impl Default for PlayerMetadataBundle { score: Score(0), player_mode_customisation: PlayerModeCustomisation(0), player_main_hand: PlayerMainHand(Default::default()), - shoulder_left: ShoulderLeft(azalea_nbt::Nbt::Compound(Default::default())), - shoulder_right: ShoulderRight(azalea_nbt::Nbt::Compound(Default::default())), + shoulder_left: ShoulderLeft(simdnbt::owned::NbtCompound::default()), + shoulder_right: ShoulderRight(simdnbt::owned::NbtCompound::default()), } } } -- cgit v1.2.3