mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-03-05 17:44:52 +01:00
World: Chunk: remove unnecessary level class member
This commit is contained in:
parent
0f6c467566
commit
16a1258f08
2 changed files with 2 additions and 6 deletions
|
@ -18,7 +18,8 @@ namespace MinedMap {
|
||||||
namespace World {
|
namespace World {
|
||||||
|
|
||||||
Chunk::Chunk(const ChunkData *data) {
|
Chunk::Chunk(const ChunkData *data) {
|
||||||
level = assertValue(data->getRoot().get<NBT::CompoundTag>("Level"));
|
std::shared_ptr<const NBT::CompoundTag> level =
|
||||||
|
assertValue(data->getRoot().get<NBT::CompoundTag>("Level"));
|
||||||
|
|
||||||
std::shared_ptr<const NBT::ListTag> sectionsTag = level->get<NBT::ListTag>("Sections");
|
std::shared_ptr<const NBT::ListTag> sectionsTag = level->get<NBT::ListTag>("Sections");
|
||||||
if (!sectionsTag || sectionsTag->empty())
|
if (!sectionsTag || sectionsTag->empty())
|
||||||
|
|
|
@ -55,7 +55,6 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<const NBT::CompoundTag> level;
|
|
||||||
std::vector<std::unique_ptr<Section>> sections;
|
std::vector<std::unique_ptr<Section>> sections;
|
||||||
|
|
||||||
std::shared_ptr<const NBT::ByteArrayTag> biomeBytes;
|
std::shared_ptr<const NBT::ByteArrayTag> biomeBytes;
|
||||||
|
@ -80,10 +79,6 @@ private:
|
||||||
public:
|
public:
|
||||||
Chunk(const ChunkData *data);
|
Chunk(const ChunkData *data);
|
||||||
|
|
||||||
const NBT::CompoundTag & getLevel() const {
|
|
||||||
return *level;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t getBiome(block_idx_t x, y_idx_t y, block_idx_t z) const;
|
uint8_t getBiome(block_idx_t x, y_idx_t y, block_idx_t z) const;
|
||||||
Block getBlock(block_idx_t x, Height y, block_idx_t z) const;
|
Block getBlock(block_idx_t x, Height y, block_idx_t z) const;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue