diff options
Diffstat (limited to 'azalea-block/src')
| -rw-r--r-- | azalea-block/src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/azalea-block/src/lib.rs b/azalea-block/src/lib.rs index a6de1e92..f07b1bce 100644 --- a/azalea-block/src/lib.rs +++ b/azalea-block/src/lib.rs @@ -7,8 +7,10 @@ pub use blocks::*; use std::mem; impl BlockState { - /// Transmutes a u32 to a block state. UB if the value is not a valid block - /// state. + /// Transmutes a u32 to a block state. + /// + /// # Safety + /// The `state_id` should be a valid block state. #[inline] pub unsafe fn from_u32_unsafe(state_id: u32) -> Self { mem::transmute::<u32, BlockState>(state_id) |
