diff options
Diffstat (limited to 'src/World/Chunk.hpp')
-rw-r--r-- | src/World/Chunk.hpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/World/Chunk.hpp b/src/World/Chunk.hpp index eba4626..7c485eb 100644 --- a/src/World/Chunk.hpp +++ b/src/World/Chunk.hpp @@ -28,7 +28,7 @@ #include "../UniqueCPtr.hpp" -#include "../NBT/Tag.hpp" +#include "../NBT/CompoundTag.hpp" #include <cstdint> #include <tuple> @@ -37,14 +37,12 @@ namespace MinedMap { namespace World { -class Chunk { +class Chunk : public std::shared_ptr<const NBT::CompoundTag> { public: static const size_t SIZE = 16; private: - static std::tuple<UniqueCPtr<uint8_t[]>, size_t> inflateChunk(uint8_t *data, size_t len); - - std::shared_ptr<NBT::Tag> content; + static std::pair<UniqueCPtr<uint8_t[]>, size_t> inflateChunk(uint8_t *data, size_t len); public: Chunk(uint8_t *buffer, size_t buflen); |