aboutsummaryrefslogtreecommitdiff
path: root/azalea-block/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-block/src')
-rw-r--r--azalea-block/src/block_state.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/azalea-block/src/block_state.rs b/azalea-block/src/block_state.rs
index f7ef9006..08baad2f 100644
--- a/azalea-block/src/block_state.rs
+++ b/azalea-block/src/block_state.rs
@@ -85,6 +85,14 @@ impl TryFrom<u32> for BlockState {
}
}
}
+impl TryFrom<i32> for BlockState {
+ type Error = ();
+
+ fn try_from(state_id: i32) -> Result<Self, Self::Error> {
+ Self::try_from(state_id as u32)
+ }
+}
+
impl TryFrom<u16> for BlockState {
type Error = ();