aboutsummaryrefslogtreecommitdiff
path: root/azalea-core/src
diff options
context:
space:
mode:
authorveronoicc <64193056+veronoicc@users.noreply.github.com>2024-05-14 23:59:36 +0200
committerGitHub <noreply@github.com>2024-05-14 16:59:36 -0500
commit892869ad1249e238eb9228d57bd9884793a9fe75 (patch)
tree57d6bdc810b6d5989fbdc6a9ed171c2fd51b5455 /azalea-core/src
parentb00106b7ff18c2d1fc5b751227616f5bf1f3495c (diff)
downloadazalea-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/src')
-rw-r--r--azalea-core/src/registry_holder.rs14
1 files changed, 1 insertions, 13 deletions
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),