From 892869ad1249e238eb9228d57bd9884793a9fe75 Mon Sep 17 00:00:00 2001 From: veronoicc <64193056+veronoicc@users.noreply.github.com> Date: Tue, 14 May 2024 23:59:36 +0200 Subject: Update simdnbt dep (#148) * Update simdnbt dep * Fix not compiling (rust analyzer is still yapping, i trust you cargo check) * Update simdnbt to 0.5.2 * finally everything works :prayge: --- azalea-core/src/registry_holder.rs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'azalea-core/src') diff --git a/azalea-core/src/registry_holder.rs b/azalea-core/src/registry_holder.rs index 7e179e6f..68dfcf29 100644 --- a/azalea-core/src/registry_holder.rs +++ b/azalea-core/src/registry_holder.rs @@ -51,9 +51,8 @@ impl RegistryHolder { // convert the value to T let mut nbt_bytes = Vec::new(); value.write(&mut nbt_bytes); - let alloc = Default::default(); let nbt_borrow_compound = - simdnbt::borrow::NbtCompound::read(&mut Cursor::new(&nbt_bytes), &alloc).ok()?; + simdnbt::borrow::read_compound(&mut Cursor::new(&nbt_bytes)).ok()?; let value = match T::from_compound(&nbt_borrow_compound) { Ok(value) => value, Err(err) => { @@ -136,18 +135,12 @@ pub struct ChatTypeStyle { #[simdnbt(deny_unknown_fields)] pub struct DimensionTypeElement { pub ambient_light: f32, - #[serde(with = "Convert")] pub bed_works: bool, pub coordinate_scale: f32, pub effects: ResourceLocation, - #[serde(default)] - #[serde(skip_serializing_if = "Option::is_none")] pub fixed_time: Option, - #[serde(with = "Convert")] pub has_ceiling: bool, - #[serde(with = "Convert")] pub has_raids: bool, - #[serde(with = "Convert")] pub has_skylight: bool, pub height: u32, pub infiniburn: ResourceLocation, @@ -155,13 +148,9 @@ pub struct DimensionTypeElement { pub min_y: i32, pub monster_spawn_block_light_limit: u32, pub monster_spawn_light_level: MonsterSpawnLightLevel, - #[serde(with = "Convert")] pub natural: bool, - #[serde(with = "Convert")] pub piglin_safe: bool, - #[serde(with = "Convert")] pub respawn_anchor_works: bool, - #[serde(with = "Convert")] pub ultrawarm: bool, } @@ -181,7 +170,6 @@ pub struct DimensionTypeElement { /// max. #[derive(Debug, Clone)] // #[serde(untagged)] -#[cfg_attr(feature = "strict_registry", simdnbt(deny_unknown_fields))] pub enum MonsterSpawnLightLevel { /// A simple minimum value. Simple(u32), -- cgit v1.2.3