diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-02-01 11:58:50 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-02-01 11:58:50 +0100 |
commit | d26fe3d9f8c3b298f628aa3f08edbd3656febb08 (patch) | |
tree | 86d9cae36a34ec6f1906880361eb02fe96620226 /src/World/Chunk.cpp | |
parent | cd45c4009c606bceb11a1d4202204ecd0969b5ef (diff) | |
download | MinedMap-d26fe3d9f8c3b298f628aa3f08edbd3656febb08.tar MinedMap-d26fe3d9f8c3b298f628aa3f08edbd3656febb08.zip |
Write PNG files
No biome colors or light levels yet...
Diffstat (limited to 'src/World/Chunk.cpp')
-rw-r--r-- | src/World/Chunk.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/World/Chunk.cpp b/src/World/Chunk.cpp index 2dc9014..99d40a5 100644 --- a/src/World/Chunk.cpp +++ b/src/World/Chunk.cpp @@ -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; } |