mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-05 15:19:07 +02:00
Do not store biome in block structure
Use biome data from biome map.
This commit is contained in:
parent
a3cf5edda4
commit
50f798f89e
3 changed files with 9 additions and 7 deletions
|
@ -38,10 +38,9 @@ struct Block {
|
|||
const Resource::BlockType *type;
|
||||
unsigned depth;
|
||||
uint8_t blockLight;
|
||||
uint8_t biome;
|
||||
|
||||
|
||||
Resource::Color getColor() const {
|
||||
Resource::Color getColor(uint8_t biome) const {
|
||||
if (!type || !(type->flags & BLOCK_OPAQUE))
|
||||
return Resource::Color {};
|
||||
|
||||
|
|
|
@ -85,7 +85,6 @@ Block Chunk::getBlock(size_t x, Chunk::Height height, size_t z) const {
|
|||
Block block = {};
|
||||
|
||||
block.depth = height.depth;
|
||||
block.biome = getBiome(x, height.y, z);
|
||||
|
||||
size_t Y = height.y / SIZE;
|
||||
size_t y = height.y % SIZE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue