Section: implement new Minecraft 1.16 block state format

This commit is contained in:
Matthias Schiffer 2020-06-18 22:51:24 +02:00
parent 73b8b677da
commit 7a99a19998
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
2 changed files with 37 additions and 16 deletions

View file

@ -112,8 +112,8 @@ class PaletteSection : public Section {
private:
std::shared_ptr<const NBT::LongArrayTag> blockStates;
std::vector<const Resource::BlockType *> palette;
size_t bits;
uint16_t mask;
uint32_t dataVersion;
unsigned bits;
static const Resource::BlockType * lookup(const std::string &name, uint32_t dataVersion);
@ -127,7 +127,7 @@ public:
const std::shared_ptr<const NBT::CompoundTag> &section,
std::shared_ptr<const NBT::LongArrayTag> &&blockStates0,
const std::shared_ptr<const NBT::ListTag> &paletteData,
uint32_t dataVersion
uint32_t dataVersion0
);
virtual const Resource::BlockType * getBlockStateAt(size_t x, size_t y, size_t z) const;