Use template argument for list subtype, extract further information from chunks

This commit is contained in:
Matthias Schiffer 2015-02-01 03:21:57 +01:00
parent a6a2a62812
commit fc1fc8fbbc
9 changed files with 108 additions and 32 deletions

View file

@ -95,6 +95,10 @@ Chunk::Chunk(uint8_t *buffer, size_t buflen) {
if (!(*this) || tag.first != "")
throw std::invalid_argument("invalid root tag");
sections = (*this)->get<const NBT::ListTag<NBT::CompoundTag>>("Level", "Sections");
if (!sections)
throw std::invalid_argument("no sections found");
}
}