aboutsummaryrefslogtreecommitdiff
path: root/azalea-world/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-06-02 11:51:03 -0600
committermat <git@matdoes.dev>2025-06-02 11:51:03 -0600
commitc5ddae58a172289fffde991830bb79860421a961 (patch)
treeec24421b4234a0d7d3ef660707a753b685ec920a /azalea-world/src
parent2c5f293210a09c99577a6999afd52357c898eaeb (diff)
downloadazalea-drasl-c5ddae58a172289fffde991830bb79860421a961.tar.xz
improve docs for biome code
Diffstat (limited to 'azalea-world/src')
-rw-r--r--azalea-world/src/world.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/azalea-world/src/world.rs b/azalea-world/src/world.rs
index 47804dcc..3e6359ff 100644
--- a/azalea-world/src/world.rs
+++ b/azalea-world/src/world.rs
@@ -179,6 +179,14 @@ impl Instance {
self.chunks.get_block_state(pos).map(FluidState::from)
}
+ /// Get the biome at the given position.
+ ///
+ /// You can then use `Client::with_resolved_registry` to get the name and
+ /// data from the biome.
+ ///
+ /// Note that biomes are internally stored as 4x4x4 blocks, so if you're
+ /// writing code that searches for a specific biome it'll probably be more
+ /// efficient to avoid scanning every single block.
pub fn get_biome(&self, pos: &BlockPos) -> Option<Biome> {
self.chunks.get_biome(pos)
}