mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-02 13:59:07 +02:00
world/section: prefer slice references to Vec and fastnbt types
Makes the code a bit nicer and saves repeated deref calls into fastnbt.
This commit is contained in:
parent
a4b726992a
commit
56573640fd
2 changed files with 11 additions and 15 deletions
|
@ -92,12 +92,12 @@ impl<'a> Chunk<'a> {
|
|||
(
|
||||
SectionV1_13::new(
|
||||
data_version,
|
||||
section.block_states.data.as_ref(),
|
||||
section.block_states.data.as_deref(),
|
||||
§ion.block_states.palette,
|
||||
block_types,
|
||||
)
|
||||
.with_context(|| format!("Failed to load section at Y={}", section.y))?,
|
||||
BiomesV18::new(section.biomes.data.as_ref(), §ion.biomes.palette)
|
||||
BiomesV18::new(section.biomes.data.as_deref(), §ion.biomes.palette)
|
||||
.with_context(|| {
|
||||
format!("Failed to load section biomes at Y={}", section.y)
|
||||
})?,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue