aboutsummaryrefslogtreecommitdiff
path: root/azalea-physics/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-06-02 07:45:26 +1100
committermat <git@matdoes.dev>2025-06-02 07:45:26 +1100
commitd028d7c3e9c84d177b7b10fa0d8f77d11bcea20f (patch)
treea37fa4167a3171dd46c17d8ea5b8674cc72c3c78 /azalea-physics/src
parentb103e6fdc0daa131d1177c5d0705134640aa9d6e (diff)
downloadazalea-drasl-d028d7c3e9c84d177b7b10fa0d8f77d11bcea20f.tar.xz
add basic support for getting biome ids in chunks
Diffstat (limited to 'azalea-physics/src')
-rw-r--r--azalea-physics/src/collision/world_collisions.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea-physics/src/collision/world_collisions.rs b/azalea-physics/src/collision/world_collisions.rs
index ded31275..11e8946f 100644
--- a/azalea-physics/src/collision/world_collisions.rs
+++ b/azalea-physics/src/collision/world_collisions.rs
@@ -86,7 +86,7 @@ impl<'a> BlockCollisionsState<'a> {
let block_state: BlockState = if item_chunk_pos == initial_chunk_pos {
match &initial_chunk {
Some(initial_chunk) => initial_chunk
- .get(&ChunkBlockPos::from(item.pos), self.world.chunks.min_y)
+ .get_block_state(&ChunkBlockPos::from(item.pos), self.world.chunks.min_y)
.unwrap_or(BlockState::AIR),
_ => BlockState::AIR,
}
@@ -186,7 +186,7 @@ impl<'a> BlockCollisionsState<'a> {
for (cached_section_pos, cached_section) in &self.cached_sections {
if section_pos == *cached_section_pos {
- return cached_section.get(section_block_pos);
+ return cached_section.get_block_state(section_block_pos);
}
}
@@ -211,7 +211,7 @@ impl<'a> BlockCollisionsState<'a> {
// println!("chunk section data: {:?}", section.states.storage.data);
// println!("biome length: {}", section.biomes.storage.data.len());
- section.get(section_block_pos)
+ section.get_block_state(section_block_pos)
}
fn get_block_shape(&mut self, block_state: BlockState) -> &'static VoxelShape {