Use biome data

This commit is contained in:
Matthias Schiffer 2015-02-01 15:19:18 +01:00
parent 143b9f6c78
commit 9b1d92387d
5 changed files with 20 additions and 4 deletions

View file

@ -67,6 +67,7 @@ private:
std::unique_ptr<uint8_t[]> blockData;
std::unique_ptr<uint8_t[]> blockSkyLight;
std::unique_ptr<uint8_t[]> blockBlockLight;
const uint8_t *biomes;
size_t getIndex(size_t x, size_t y, size_t z) const {
@ -101,6 +102,10 @@ private:
return getHalf(blockSkyLight.get(), x, y, z);
}
uint8_t getBiomeAt(size_t x, size_t z) const {
return biomes[z*SIZE + x];
}
void inflateChunk(Buffer buffer);
void parseChunk();