mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-02 13:59:07 +02:00
world: distinguish pre-v1.18 biome data structures
This commit is contained in:
parent
e62e19796c
commit
f2b7808e84
2 changed files with 33 additions and 4 deletions
|
@ -24,14 +24,14 @@ pub enum Chunk<'a> {
|
|||
/// block IDs
|
||||
V1_13 {
|
||||
section_map: BTreeMap<SectionY, (SectionV1_13<'a>, BlockLight<'a>)>,
|
||||
biomes: &'a de::BiomesV0,
|
||||
biomes: BiomesV0<'a>,
|
||||
},
|
||||
/// Original pre-1.13 chunk
|
||||
///
|
||||
/// The original chunk format with fixed 8-bit numeric block IDs
|
||||
V0 {
|
||||
section_map: BTreeMap<SectionY, (SectionV0<'a>, BlockLight<'a>)>,
|
||||
biomes: &'a de::BiomesV0,
|
||||
biomes: BiomesV0<'a>,
|
||||
},
|
||||
/// Unpopulated chunk without any block data
|
||||
Empty,
|
||||
|
@ -158,8 +158,7 @@ impl<'a> Chunk<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO Check biomes length
|
||||
let biomes = level.biomes.as_ref().context("Invalid biome data");
|
||||
let biomes = BiomesV0::new(level.biomes.as_ref());
|
||||
|
||||
Ok(
|
||||
match (section_map_v1_13.is_empty(), section_map_v0.is_empty()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue