From 5b69087b729d91be330662d902a3e351d51789f2 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 27 Jul 2012 21:00:11 +0000 Subject: Removed bottom lava from caves generator, added a new finish generator BottomLava for that. Also fixed a slight error in SameBlock composition generator cfg git-svn-id: http://mc-server.googlecode.com/svn/trunk@698 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/FinishGen.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'source/FinishGen.cpp') diff --git a/source/FinishGen.cpp b/source/FinishGen.cpp index 819bfff76..26c3a70f1 100644 --- a/source/FinishGen.cpp +++ b/source/FinishGen.cpp @@ -356,3 +356,32 @@ void cFinishGenLilypads::GenFinish( +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// cFinishGenBottomLava: + +void cFinishGenBottomLava::GenFinish( + int a_ChunkX, int a_ChunkZ, + cChunkDef::BlockTypes & a_BlockTypes, // Block types to read and change + cChunkDef::BlockNibbles & a_BlockMeta, // Block meta to read and change + cChunkDef::HeightMap & a_HeightMap, // Height map to read and change by the current data + const cChunkDef::BiomeMap & a_BiomeMap, // Biomes to adhere to + cEntityList & a_Entities, // Entities may be added or deleted + cBlockEntityList & a_BlockEntities // Block entities may be added or deleted +) +{ + for (int y = m_Level; y > 0; y--) + { + for (int z = 0; z < cChunkDef::Width; z++) for (int x = 0; x < cChunkDef::Width; x++) + { + int Index = cChunkDef::MakeIndexNoCheck(x, y, z); + if (a_BlockTypes[Index] == E_BLOCK_AIR) + { + a_BlockTypes[Index] = E_BLOCK_STATIONARY_LAVA; + } + } // for x, for z + } // for y +} + + + + -- cgit v1.2.3