aboutsummaryrefslogtreecommitdiff
path: root/azalea-block/src/range.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2024-12-24 09:40:29 +0000
committermat <git@matdoes.dev>2024-12-24 09:40:29 +0000
commita599b5614e6acf65e552940fff99a9252a600472 (patch)
treecf686191747a389f963b633a0898940cba594d13 /azalea-block/src/range.rs
parentf03e0c22355778a9863cccb5a59d852278d60701 (diff)
downloadazalea-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.rs6
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 });