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-block | |
| parent | b103e6fdc0daa131d1177c5d0705134640aa9d6e (diff) | |
| download | azalea-drasl-d028d7c3e9c84d177b7b10fa0d8f77d11bcea20f.tar.xz | |
add basic support for getting biome ids in chunks
Diffstat (limited to 'azalea-block')
| -rw-r--r-- | azalea-block/src/block_state.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/azalea-block/src/block_state.rs b/azalea-block/src/block_state.rs index ab0ca076..dfa2a9b2 100644 --- a/azalea-block/src/block_state.rs +++ b/azalea-block/src/block_state.rs @@ -94,6 +94,12 @@ impl TryFrom<u16> for BlockState { } } } +impl From<BlockState> for u32 { + /// See [`BlockState::id`]. + fn from(value: BlockState) -> Self { + value.id as u32 + } +} impl AzaleaRead for BlockState { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> { |
