From 0569ffd2d85585eb69de9068ab3f62e768bce4e7 Mon Sep 17 00:00:00 2001 From: mat Date: Mon, 15 Dec 2025 14:59:26 +0700 Subject: write/update docs for several items --- azalea-world/src/world.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'azalea-world/src/world.rs') diff --git a/azalea-world/src/world.rs b/azalea-world/src/world.rs index e4260aee..c2ba6749 100644 --- a/azalea-world/src/world.rs +++ b/azalea-world/src/world.rs @@ -169,10 +169,14 @@ pub struct Instance { } impl Instance { + /// Get the block at the given position, or `None` if it's outside of the + /// world that we have loaded. pub fn get_block_state(&self, pos: BlockPos) -> Option { self.chunks.get_block_state(pos) } + /// Similar to [`Self::get_block_state`], but returns data about the fluid + /// at the position, including for waterlogged blocks. pub fn get_fluid_state(&self, pos: BlockPos) -> Option { self.chunks.get_block_state(pos).map(FluidState::from) } -- cgit v1.2.3