mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-12 09:59:05 +02:00
Resolve pre-1.13 block types by mapping them to 1.13 types
This commit is contained in:
parent
fed9c21f5e
commit
dd432af298
4 changed files with 87 additions and 4622 deletions
File diff suppressed because it is too large
Load diff
|
@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue