aboutsummaryrefslogtreecommitdiff
path: root/azalea-block/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-block/src')
-rw-r--r--azalea-block/src/range.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/azalea-block/src/range.rs b/azalea-block/src/range.rs
index 779d805d..fb6552d5 100644
--- a/azalea-block/src/range.rs
+++ b/azalea-block/src/range.rs
@@ -44,3 +44,19 @@ impl Add for BlockStates {
}
}
}
+
+impl From<HashSet<azalea_registry::Block>> for BlockStates {
+ fn from(set: HashSet<azalea_registry::Block>) -> Self {
+ Self {
+ set: set.into_iter().map(|b| b.into()).collect(),
+ }
+ }
+}
+
+impl From<&HashSet<azalea_registry::Block>> for BlockStates {
+ fn from(set: &HashSet<azalea_registry::Block>) -> Self {
+ Self {
+ set: set.iter().map(|&b| b.into()).collect(),
+ }
+ }
+}