diff options
| author | mat <git@matdoes.dev> | 2024-12-24 09:40:29 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-12-24 09:40:29 +0000 |
| commit | a599b5614e6acf65e552940fff99a9252a600472 (patch) | |
| tree | cf686191747a389f963b633a0898940cba594d13 /azalea-block/src/range.rs | |
| parent | f03e0c22355778a9863cccb5a59d852278d60701 (diff) | |
| download | azalea-drasl-a599b5614e6acf65e552940fff99a9252a600472.tar.xz | |
make BlockState a u16 and add a BlockStateIntegerRepr type
Diffstat (limited to 'azalea-block/src/range.rs')
| -rw-r--r-- | azalea-block/src/range.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea-block/src/range.rs b/azalea-block/src/range.rs index 9b520d49..779d805d 100644 --- a/azalea-block/src/range.rs +++ b/azalea-block/src/range.rs @@ -3,15 +3,15 @@ use std::{ ops::{Add, RangeInclusive}, }; -use crate::BlockState; +use crate::{BlockState, BlockStateIntegerRepr}; #[derive(Debug, Clone)] pub struct BlockStates { pub set: HashSet<BlockState>, } -impl From<RangeInclusive<u32>> for BlockStates { - fn from(range: RangeInclusive<u32>) -> Self { +impl From<RangeInclusive<BlockStateIntegerRepr>> for BlockStates { + fn from(range: RangeInclusive<BlockStateIntegerRepr>) -> Self { let mut set = HashSet::with_capacity((range.end() - range.start() + 1) as usize); for id in range { set.insert(BlockState { id }); |
