From 16a1258f082b1e37e82757f559cfc1b1f9d4ba91 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 3 Dec 2021 23:45:31 +0100 Subject: [PATCH] World: Chunk: remove unnecessary level class member --- src/World/Chunk.cpp | 3 ++- src/World/Chunk.hpp | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/World/Chunk.cpp b/src/World/Chunk.cpp index 3845c9b..c326669 100644 --- a/src/World/Chunk.cpp +++ b/src/World/Chunk.cpp @@ -18,7 +18,8 @@ namespace MinedMap { namespace World { Chunk::Chunk(const ChunkData *data) { - level = assertValue(data->getRoot().get("Level")); + std::shared_ptr level = + assertValue(data->getRoot().get("Level")); std::shared_ptr sectionsTag = level->get("Sections"); if (!sectionsTag || sectionsTag->empty()) diff --git a/src/World/Chunk.hpp b/src/World/Chunk.hpp index 817b29f..cfae0f7 100644 --- a/src/World/Chunk.hpp +++ b/src/World/Chunk.hpp @@ -55,7 +55,6 @@ public: }; private: - std::shared_ptr level; std::vector> sections; std::shared_ptr biomeBytes; @@ -80,10 +79,6 @@ private: public: 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; Block getBlock(block_idx_t x, Height y, block_idx_t z) const;