mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-03 06:09:07 +02:00
Add quirk for stone_slab rename
The old stone_slab block from pre-1.14 has been renamed to smooth_stone_slab, and the name stone_slab was reused for a new block. Resolve the palette entry depending on the chunk's dataVersion.
This commit is contained in:
parent
359ace4932
commit
ae68c3bab4
4 changed files with 24 additions and 9 deletions
|
@ -81,7 +81,7 @@ public:
|
|||
return getHalf(blockLight->getValue(), x, y, z);
|
||||
}
|
||||
|
||||
static std::unique_ptr<Section> makeSection(const std::shared_ptr<const NBT::CompoundTag> §ion);
|
||||
static std::unique_ptr<Section> makeSection(const std::shared_ptr<const NBT::CompoundTag> §ion, uint32_t dataVersion);
|
||||
};
|
||||
|
||||
class LegacySection : public Section {
|
||||
|
@ -116,6 +116,8 @@ private:
|
|||
uint16_t mask;
|
||||
|
||||
|
||||
static const Resource::BlockType * lookup(const std::string &name, uint32_t dataVersion);
|
||||
|
||||
static size_t mangleByteIndex(size_t index) {
|
||||
return (index & ~(size_t)7) + 7 - (index & 7);
|
||||
}
|
||||
|
@ -124,7 +126,8 @@ public:
|
|||
PaletteSection(
|
||||
const std::shared_ptr<const NBT::CompoundTag> §ion,
|
||||
std::shared_ptr<const NBT::LongArrayTag> &&blockStates0,
|
||||
const std::shared_ptr<const NBT::ListTag> &paletteData
|
||||
const std::shared_ptr<const NBT::ListTag> &paletteData,
|
||||
uint32_t dataVersion
|
||||
);
|
||||
|
||||
virtual const Resource::BlockType * getBlockStateAt(size_t x, size_t y, size_t z) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue