Resolve pre-1.13 block types by mapping them to 1.13 types

This commit is contained in:
Matthias Schiffer 2018-07-24 01:33:21 +02:00
parent fed9c21f5e
commit dd432af298
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
4 changed files with 87 additions and 4622 deletions

View file

@ -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);