1
0

MCServer world compatiblity with vanilla and mcedit.

This commit is contained in:
Howaner
2014-09-23 19:16:17 +02:00
parent 33f8091d5f
commit 366af5067b
3 changed files with 52 additions and 5 deletions

View File

@@ -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));