world/layer: move Option into BlockInfo struct

Preparation for top_layer() cleanup.
This commit is contained in:
Matthias Schiffer 2023-05-05 23:29:57 +02:00
parent 263fc6d6ce
commit 2d5eec13c2
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
2 changed files with 18 additions and 39 deletions

View file

@ -35,11 +35,11 @@ impl<'a> TileRenderer<'a> {
};
image::Rgba(match (&blocks[coords], &biomes[coords]) {
(
Some(world::layer::BlockInfo {
block_type,
world::layer::BlockInfo {
block_type: Some(block_type),
depth: Some(depth),
..
}),
},
Some(biome),
) => block_color(*block_type, biome, depth.0 as f32),
_ => [0, 0, 0, 0],