mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-03-05 17:44:52 +01:00
world: correctly name BiomesV1_18
This commit is contained in:
parent
e117c76937
commit
b8b0e0627f
2 changed files with 6 additions and 6 deletions
|
@ -17,7 +17,7 @@ use crate::{
|
||||||
pub enum Chunk<'a> {
|
pub enum Chunk<'a> {
|
||||||
/// Minecraft v1.18+ chunk with biome data moved into sections
|
/// Minecraft v1.18+ chunk with biome data moved into sections
|
||||||
V1_18 {
|
V1_18 {
|
||||||
section_map: BTreeMap<SectionY, (SectionV1_13<'a>, BiomesV18<'a>, BlockLight<'a>)>,
|
section_map: BTreeMap<SectionY, (SectionV1_13<'a>, BiomesV1_18<'a>, BlockLight<'a>)>,
|
||||||
},
|
},
|
||||||
/// Minecraft v1.13+ chunk
|
/// Minecraft v1.13+ chunk
|
||||||
///
|
///
|
||||||
|
@ -45,7 +45,7 @@ pub enum Chunk<'a> {
|
||||||
enum SectionIterInner<'a> {
|
enum SectionIterInner<'a> {
|
||||||
/// Iterator over sections of [Chunk::V1_18]
|
/// Iterator over sections of [Chunk::V1_18]
|
||||||
V1_18 {
|
V1_18 {
|
||||||
iter: btree_map::Iter<'a, SectionY, (SectionV1_13<'a>, BiomesV18<'a>, BlockLight<'a>)>,
|
iter: btree_map::Iter<'a, SectionY, (SectionV1_13<'a>, BiomesV1_18<'a>, BlockLight<'a>)>,
|
||||||
},
|
},
|
||||||
/// Iterator over sections of [Chunk::V1_13]
|
/// Iterator over sections of [Chunk::V1_13]
|
||||||
V1_13 {
|
V1_13 {
|
||||||
|
@ -104,7 +104,7 @@ impl<'a> Chunk<'a> {
|
||||||
block_types,
|
block_types,
|
||||||
)
|
)
|
||||||
.with_context(|| format!("Failed to load section at Y={}", section.y))?,
|
.with_context(|| format!("Failed to load section at Y={}", section.y))?,
|
||||||
BiomesV18::new(
|
BiomesV1_18::new(
|
||||||
section.biomes.data.as_deref(),
|
section.biomes.data.as_deref(),
|
||||||
§ion.biomes.palette,
|
§ion.biomes.palette,
|
||||||
biome_types,
|
biome_types,
|
||||||
|
|
|
@ -175,13 +175,13 @@ impl<'a> Section for SectionV0<'a> {
|
||||||
/// the biomes laid out as an array of indices into a palette, similar to the
|
/// the biomes laid out as an array of indices into a palette, similar to the
|
||||||
/// v1.13+ block data.
|
/// v1.13+ block data.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct BiomesV18<'a> {
|
pub struct BiomesV1_18<'a> {
|
||||||
_biomes: Option<&'a [i64]>,
|
_biomes: Option<&'a [i64]>,
|
||||||
_palette: &'a [String],
|
_palette: &'a [String],
|
||||||
_bits: u8,
|
_bits: u8,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> BiomesV18<'a> {
|
impl<'a> BiomesV1_18<'a> {
|
||||||
/// Constructs a new [BiomesV18] from deserialized data structures
|
/// Constructs a new [BiomesV18] from deserialized data structures
|
||||||
pub fn new(
|
pub fn new(
|
||||||
biomes: Option<&'a [i64]>,
|
biomes: Option<&'a [i64]>,
|
||||||
|
@ -198,7 +198,7 @@ impl<'a> BiomesV18<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(BiomesV18 {
|
Ok(BiomesV1_18 {
|
||||||
_biomes: biomes,
|
_biomes: biomes,
|
||||||
_palette: palette,
|
_palette: palette,
|
||||||
_bits: bits,
|
_bits: bits,
|
||||||
|
|
Loading…
Add table
Reference in a new issue