diff options
| author | mat <git@matdoes.dev> | 2026-03-21 08:05:27 +0330 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2026-03-21 11:35:31 +0700 |
| commit | 88606d9ce9e13fcdd4ab5ce26e52630dee614c1e (patch) | |
| tree | ee9d1db9871eba381a876e7472946f267280a8ff /azalea-world/src/find_blocks.rs | |
| parent | 7965bb7953bfcabd475e213db335d90e0db28497 (diff) | |
| download | azalea-drasl-88606d9ce9e13fcdd4ab5ce26e52630dee614c1e.tar.xz | |
Extensible ChunkStorage
Co-authored-by: sdwhw <191973436+sdwhw@users.noreply.github.com>
Diffstat (limited to 'azalea-world/src/find_blocks.rs')
| -rw-r--r-- | azalea-world/src/find_blocks.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/azalea-world/src/find_blocks.rs b/azalea-world/src/find_blocks.rs index 753809ef..7de7a91f 100644 --- a/azalea-world/src/find_blocks.rs +++ b/azalea-world/src/find_blocks.rs @@ -1,7 +1,9 @@ use azalea_block::{BlockState, BlockStates}; use azalea_core::position::{BlockPos, ChunkPos}; -use crate::{Chunk, ChunkStorage, World, iterators::ChunkIterator, palette::Palette}; +use crate::{ + Chunk, World, chunk::storage::ChunkStorage, iterators::ChunkIterator, palette::Palette, +}; impl World { /// Find the coordinates of a block in the world. @@ -45,7 +47,7 @@ impl World { block_states, chunk_pos, &chunk.read(), - self.chunks.min_y, + self.chunks.min_y(), |this_block_pos| { let this_block_distance = (nearest_to - this_block_pos).length_manhattan(); // only update if it's closer @@ -157,7 +159,7 @@ impl Iterator for FindBlocks<'_> { self.block_states, chunk_pos, &chunk.read(), - self.chunks.min_y, + self.chunks.min_y(), |this_block_pos| { let this_block_distance = (self.nearest_to - this_block_pos).length_manhattan(); @@ -250,7 +252,7 @@ mod tests { use azalea_registry::builtin::BlockKind; use super::*; - use crate::{Chunk, PartialChunkStorage}; + use crate::{Chunk, chunk::partial::PartialChunkStorage}; #[test] fn find_block() { |
