mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-01 05:29:05 +02:00
world/layer: move Option into BlockInfo struct
Preparation for top_layer() cleanup.
This commit is contained in:
parent
263fc6d6ce
commit
2d5eec13c2
2 changed files with 18 additions and 39 deletions
|
@ -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],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue