diff options
| author | mat <git@matdoes.dev> | 2025-06-02 07:45:26 +1100 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-06-02 07:45:26 +1100 |
| commit | d028d7c3e9c84d177b7b10fa0d8f77d11bcea20f (patch) | |
| tree | a37fa4167a3171dd46c17d8ea5b8674cc72c3c78 /azalea-world/src/world.rs | |
| parent | b103e6fdc0daa131d1177c5d0705134640aa9d6e (diff) | |
| download | azalea-drasl-d028d7c3e9c84d177b7b10fa0d8f77d11bcea20f.tar.xz | |
add basic support for getting biome ids in chunks
Diffstat (limited to 'azalea-world/src/world.rs')
| -rw-r--r-- | azalea-world/src/world.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/azalea-world/src/world.rs b/azalea-world/src/world.rs index 183f59b5..00bee13a 100644 --- a/azalea-world/src/world.rs +++ b/azalea-world/src/world.rs @@ -11,6 +11,7 @@ use azalea_core::{ position::{BlockPos, ChunkPos}, registry_holder::RegistryHolder, }; +use azalea_registry::Biome; use bevy_ecs::{component::Component, entity::Entity}; use derive_more::{Deref, DerefMut}; use nohash_hasher::IntMap; @@ -170,6 +171,10 @@ impl Instance { self.chunks.get_block_state(pos).map(FluidState::from) } + pub fn get_biome(&self, pos: &BlockPos) -> Option<Biome> { + self.chunks.get_biome(pos) + } + pub fn set_block_state(&self, pos: &BlockPos, state: BlockState) -> Option<BlockState> { self.chunks.set_block_state(pos, state) } |
