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-world/src/chunk_storage.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'azalea-world/src') diff --git a/azalea-world/src/chunk_storage.rs b/azalea-world/src/chunk_storage.rs index 7301fdd1..ac81fd09 100755 --- a/azalea-world/src/chunk_storage.rs +++ b/azalea-world/src/chunk_storage.rs @@ -5,9 +5,9 @@ use crate::palette::PalettedContainerKind; use azalea_block::BlockState; use azalea_buf::{BufReadError, McBufReadable, McBufWritable}; use azalea_core::position::{BlockPos, ChunkBlockPos, ChunkPos, ChunkSectionBlockPos}; -use azalea_nbt::NbtCompound; use nohash_hasher::IntMap; use parking_lot::RwLock; +use simdnbt::owned::NbtCompound; use std::collections::hash_map::Entry; use std::str::FromStr; use std::{ @@ -323,11 +323,11 @@ impl Chunk { let mut heightmaps = HashMap::new(); for (name, heightmap) in heightmaps_nbt.iter() { - let Ok(kind) = HeightmapKind::from_str(name) else { + let Ok(kind) = HeightmapKind::from_str(&name.to_str()) else { warn!("Unknown heightmap kind: {name}"); continue; }; - let Some(data) = heightmap.as_long_array() else { + let Some(data) = heightmap.long_array() else { warn!("Heightmap {name} is not a long array"); continue; }; -- cgit v1.2.3