diff options
| author | mat <git@matdoes.dev> | 2024-12-27 05:43:35 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-12-27 05:43:35 +0000 |
| commit | 3c3952bb0b255a4e03537fbfe3b53634a64c6a7b (patch) | |
| tree | 85e38de84373d3f83d43ebacf7f754d14f393ceb /azalea-block/src/range.rs | |
| parent | 33e1a1326a462263aa578b5095c3c37160345c77 (diff) | |
| download | azalea-drasl-3c3952bb0b255a4e03537fbfe3b53634a64c6a7b.tar.xz | |
resolve some todos in az-core
Diffstat (limited to 'azalea-block/src/range.rs')
| -rw-r--r-- | azalea-block/src/range.rs | 16 |
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(), + } + } +} |
