summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/NBTChunkSerializer.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-09-23 19:16:17 +0200
committerHowaner <franzi.moos@googlemail.com>2014-09-23 19:16:17 +0200
commit366af5067b987e7d4ad233e258b9e93d6f472afe (patch)
tree31ce4291a0b2b09250754795870ae9de5f4086f0 /src/WorldStorage/NBTChunkSerializer.cpp
parentMerge pull request #1372 from mc-server/EntityCustomName (diff)
downloadcuberite-366af5067b987e7d4ad233e258b9e93d6f472afe.tar
cuberite-366af5067b987e7d4ad233e258b9e93d6f472afe.tar.gz
cuberite-366af5067b987e7d4ad233e258b9e93d6f472afe.tar.bz2
cuberite-366af5067b987e7d4ad233e258b9e93d6f472afe.tar.lz
cuberite-366af5067b987e7d4ad233e258b9e93d6f472afe.tar.xz
cuberite-366af5067b987e7d4ad233e258b9e93d6f472afe.tar.zst
cuberite-366af5067b987e7d4ad233e258b9e93d6f472afe.zip
Diffstat (limited to '')
-rw-r--r--src/WorldStorage/NBTChunkSerializer.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp
index 1962d42ff..09225dd90 100644
--- a/src/WorldStorage/NBTChunkSerializer.cpp
+++ b/src/WorldStorage/NBTChunkSerializer.cpp
@@ -765,6 +765,22 @@ void cNBTChunkSerializer::LightIsValid(bool a_IsLightValid)
+void cNBTChunkSerializer::HeightMap(const cChunkDef::HeightMap * a_HeightMap)
+{
+ for (int RelX = 0; RelX < cChunkDef::Width; RelX++)
+ {
+ for (int RelZ = 0; RelZ < cChunkDef::Width; RelZ++)
+ {
+ int Height = cChunkDef::GetHeight(*a_HeightMap, RelX, RelZ);
+ m_VanillaHeightMap[(RelZ << 4) | RelX] = Height;
+ }
+ }
+}
+
+
+
+
+
void cNBTChunkSerializer::BiomeData(const cChunkDef::BiomeMap * a_BiomeMap)
{
memcpy(m_Biomes, a_BiomeMap, sizeof(m_Biomes));