summaryrefslogtreecommitdiffstats
path: root/src/World/Chunk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/World/Chunk.cpp')
-rw-r--r--src/World/Chunk.cpp5
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;
}