From fc1fc8fbbc9dd9534f40de348210ea66b6defe42 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 1 Feb 2015 03:21:57 +0100 Subject: Use template argument for list subtype, extract further information from chunks --- src/World/Chunk.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/World/Chunk.hpp') diff --git a/src/World/Chunk.hpp b/src/World/Chunk.hpp index 7c485eb..3ed6cf4 100644 --- a/src/World/Chunk.hpp +++ b/src/World/Chunk.hpp @@ -29,6 +29,7 @@ #include "../UniqueCPtr.hpp" #include "../NBT/CompoundTag.hpp" +#include "../NBT/ListTag.hpp" #include #include @@ -44,8 +45,14 @@ public: private: static std::pair, size_t> inflateChunk(uint8_t *data, size_t len); + std::shared_ptr> sections; + public: Chunk(uint8_t *buffer, size_t buflen); + + const NBT::ListTag & getSections() const { + return *sections; + } }; } -- cgit v1.2.3