minedmap: split up big types by adding Boxes

Make these values faster to move around, and optimize their size when
used in Options.
This commit is contained in:
Matthias Schiffer 2023-08-05 14:21:51 +02:00
parent cd1a5e869d
commit 7b46adf6e7
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
3 changed files with 12 additions and 9 deletions

View file

@ -125,11 +125,11 @@ impl<'a> RegionProcessor<'a> {
else {
return Ok(());
};
processed_region.chunks[chunk_coords] = Some(ProcessedChunk {
processed_region.chunks[chunk_coords] = Some(Box::new(ProcessedChunk {
blocks,
biomes,
depths,
});
}));
let chunk_lightmap = Self::render_chunk_lightmap(block_light);
overlay_chunk(&mut lightmap, &chunk_lightmap, chunk_coords);