mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-12 09:59:05 +02:00
Write PNG files
No biome colors or light levels yet...
This commit is contained in:
parent
cd45c4009c
commit
d26fe3d9f8
6 changed files with 330 additions and 15 deletions
|
@ -25,6 +25,7 @@
|
|||
|
||||
|
||||
#include "Chunk.hpp"
|
||||
#include "BlockType.hpp"
|
||||
#include "../Util.hpp"
|
||||
#include "../NBT/ByteTag.hpp"
|
||||
#include "../NBT/ByteArrayTag.hpp"
|
||||
|
@ -143,7 +144,7 @@ Chunk::Blocks Chunk::getTopLayer() const {
|
|||
continue;
|
||||
|
||||
uint8_t block = getBlockAt(*it, x, y, z);
|
||||
if (block) {
|
||||
if (BLOCK_TYPES[block].opaque) {
|
||||
blocks.blocks[x][z].id = block;
|
||||
blocks.blocks[x][z].data = getDataAt(*it, x, y, z);
|
||||
done++;
|
||||
|
@ -153,8 +154,6 @@ Chunk::Blocks Chunk::getTopLayer() const {
|
|||
}
|
||||
}
|
||||
|
||||
std::cerr << "Done: " << done << std::endl;
|
||||
|
||||
return blocks;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue