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

File diff suppressed because it is too large Load diff

View file

@ -27,17 +27,33 @@
#pragma once
#include <cstdint>
#include <string>
#include <unordered_map>
namespace MinedMap {
namespace Resource {
struct BlockType {
private:
static const std::unordered_map<std::string, BlockType> Types;
public:
static const BlockType * lookup(const std::string &name);
bool opaque;
bool green;
uint32_t color;
bool blue;
struct {
uint8_t r, g, b;
} color;
};
extern const BlockType BLOCK_TYPES[256][16];
struct LegacyPalette {
const BlockType *types[256][16];
};
extern const LegacyPalette LEGACY_BLOCK_TYPES;
}
}