aboutsummaryrefslogtreecommitdiff
path: root/azalea-world/src/chunk_storage.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-07-20 05:14:30 -0500
committermat <git@matdoes.dev>2023-07-20 05:14:30 -0500
commit5062a8c8cd828e0719f93bf6931949971fed84df (patch)
treeace2e2a300a45ca097e46bef9d0b211ecb06e531 /azalea-world/src/chunk_storage.rs
parenteb596d921bf9e1e0294e2814ee90f8258935333c (diff)
downloadazalea-drasl-5062a8c8cd828e0719f93bf6931949971fed84df.tar.xz
make PalettedContainer::new less weird
Diffstat (limited to 'azalea-world/src/chunk_storage.rs')
-rwxr-xr-xazalea-world/src/chunk_storage.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/azalea-world/src/chunk_storage.rs b/azalea-world/src/chunk_storage.rs
index 61669cca..3c8d3555 100755
--- a/azalea-world/src/chunk_storage.rs
+++ b/azalea-world/src/chunk_storage.rs
@@ -1,5 +1,5 @@
use crate::palette::PalettedContainer;
-use crate::palette::PalettedContainerType;
+use crate::palette::PalettedContainerKind;
use azalea_block::BlockState;
use azalea_buf::{BufReadError, McBufReadable, McBufWritable};
use azalea_core::{BlockPos, ChunkBlockPos, ChunkPos, ChunkSectionBlockPos};
@@ -57,8 +57,8 @@ impl Default for Section {
fn default() -> Self {
Section {
block_count: 0,
- states: PalettedContainer::new(&PalettedContainerType::BlockStates).unwrap(),
- biomes: PalettedContainer::new(&PalettedContainerType::Biomes).unwrap(),
+ states: PalettedContainer::new(PalettedContainerKind::BlockStates),
+ biomes: PalettedContainer::new(PalettedContainerKind::Biomes),
}
}
}
@@ -306,7 +306,7 @@ impl McBufReadable for Section {
// "A section has more blocks than what should be possible. This is a bug!"
// );
- let states = PalettedContainer::read_with_type(buf, &PalettedContainerType::BlockStates)?;
+ let states = PalettedContainer::read_with_type(buf, &PalettedContainerKind::BlockStates)?;
for i in 0..states.storage.size() {
if !BlockState::is_valid_state(states.storage.get(i) as u32) {
@@ -318,7 +318,7 @@ impl McBufReadable for Section {
}
}
- let biomes = PalettedContainer::read_with_type(buf, &PalettedContainerType::Biomes)?;
+ let biomes = PalettedContainer::read_with_type(buf, &PalettedContainerKind::Biomes)?;
Ok(Section {
block_count,
states,