diff options
| author | veronoicc <64193056+veronoicc@users.noreply.github.com> | 2024-05-14 23:59:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-14 16:59:36 -0500 |
| commit | 892869ad1249e238eb9228d57bd9884793a9fe75 (patch) | |
| tree | 57d6bdc810b6d5989fbdc6a9ed171c2fd51b5455 /azalea-core | |
| parent | b00106b7ff18c2d1fc5b751227616f5bf1f3495c (diff) | |
| download | azalea-drasl-892869ad1249e238eb9228d57bd9884793a9fe75.tar.xz | |
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:
Diffstat (limited to 'azalea-core')
| -rw-r--r-- | azalea-core/Cargo.toml | 2 | ||||
| -rw-r--r-- | azalea-core/src/registry_holder.rs | 14 |
2 files changed, 2 insertions, 14 deletions
diff --git a/azalea-core/Cargo.toml b/azalea-core/Cargo.toml index 8511cdfa..8808bf8e 100644 --- a/azalea-core/Cargo.toml +++ b/azalea-core/Cargo.toml @@ -9,7 +9,7 @@ version = "0.10.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -simdnbt = { version = "0.4", git = "https://github.com/azalea-rs/simdnbt" } +simdnbt = { version = "0.5", git = "https://github.com/azalea-rs/simdnbt" } azalea-buf = { path = "../azalea-buf", version = "0.10.0" } azalea-registry = { path = "../azalea-registry", version = "0.10.0" } bevy_ecs = { version = "0.13.2", default-features = false, optional = true } 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<u32>, - #[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), |
