aboutsummaryrefslogtreecommitdiff
path: root/azalea-world/src/world.rs
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-world/src/world.rs
parentb103e6fdc0daa131d1177c5d0705134640aa9d6e (diff)
downloadazalea-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.rs5
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)
}