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.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/World/Chunk.cpp b/src/World/Chunk.cpp
index 38ca496..d4c6029 100644
--- a/src/World/Chunk.cpp
+++ b/src/World/Chunk.cpp
@@ -128,7 +128,9 @@ Chunk::Blocks Chunk::getTopLayer() const {
uint8_t id = getBlockAt(x, y, z);
uint8_t data = getDataAt(x, y, z);
- if (!Resource::BLOCK_TYPES[id][data].opaque)
+
+ const Resource::BlockType *type = Resource::LEGACY_BLOCK_TYPES.types[id][data];
+ if (!type || !type->opaque)
continue;
ret.blocks[x][z] = getBlock(x, y, z);