diff options
Diffstat (limited to 'azalea-world/src')
| -rwxr-xr-x | azalea-world/src/chunk_storage.rs | 5 | ||||
| -rw-r--r-- | azalea-world/src/lib.rs | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/azalea-world/src/chunk_storage.rs b/azalea-world/src/chunk_storage.rs index 2e93f2fb..ce611a61 100755 --- a/azalea-world/src/chunk_storage.rs +++ b/azalea-world/src/chunk_storage.rs @@ -7,6 +7,7 @@ use azalea_buf::{BufReadError, McBufReadable, McBufWritable}; use azalea_core::position::{BlockPos, ChunkBlockPos, ChunkPos, ChunkSectionBlockPos}; use azalea_nbt::NbtCompound; use log::{debug, trace, warn}; +use nohash_hasher::IntMap; use parking_lot::RwLock; use std::str::FromStr; use std::{ @@ -37,7 +38,7 @@ pub struct PartialChunkStorage { pub struct ChunkStorage { pub height: u32, pub min_y: i32, - pub map: HashMap<ChunkPos, Weak<RwLock<Chunk>>>, + pub map: IntMap<ChunkPos, Weak<RwLock<Chunk>>>, } /// A single chunk in a world (16*?*16 blocks). This only contains the blocks @@ -214,7 +215,7 @@ impl ChunkStorage { ChunkStorage { height, min_y, - map: HashMap::new(), + map: IntMap::default(), } } diff --git a/azalea-world/src/lib.rs b/azalea-world/src/lib.rs index 0d80f75d..55e47676 100644 --- a/azalea-world/src/lib.rs +++ b/azalea-world/src/lib.rs @@ -3,7 +3,7 @@ #![feature(error_generic_member_access)] mod bit_storage; -mod chunk_storage; +pub mod chunk_storage; mod container; pub mod heightmap; pub mod iterators; @@ -13,9 +13,7 @@ mod world; use std::backtrace::Backtrace; pub use bit_storage::BitStorage; -pub use chunk_storage::{ - calculate_chunk_storage_range, Chunk, ChunkStorage, PartialChunkStorage, Section, -}; +pub use chunk_storage::{Chunk, ChunkStorage, PartialChunkStorage, Section}; pub use container::*; use thiserror::Error; pub use world::*; |
