summaryrefslogtreecommitdiffstats
path: root/source/cChunkGenerator.cpp
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-13 17:52:28 +0200
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-13 17:52:28 +0200
commitee9e024bed46b794bfa035058127ab93131b2780 (patch)
treeaa1866314b870b5c72f74e3efe871b2ec409aa65 /source/cChunkGenerator.cpp
parentRevamped the weather system. (diff)
downloadcuberite-ee9e024bed46b794bfa035058127ab93131b2780.tar
cuberite-ee9e024bed46b794bfa035058127ab93131b2780.tar.gz
cuberite-ee9e024bed46b794bfa035058127ab93131b2780.tar.bz2
cuberite-ee9e024bed46b794bfa035058127ab93131b2780.tar.lz
cuberite-ee9e024bed46b794bfa035058127ab93131b2780.tar.xz
cuberite-ee9e024bed46b794bfa035058127ab93131b2780.tar.zst
cuberite-ee9e024bed46b794bfa035058127ab93131b2780.zip
Diffstat (limited to 'source/cChunkGenerator.cpp')
-rw-r--r--source/cChunkGenerator.cpp26
1 files changed, 23 insertions, 3 deletions
diff --git a/source/cChunkGenerator.cpp b/source/cChunkGenerator.cpp
index 34bbe4b3a..82dc432e3 100644
--- a/source/cChunkGenerator.cpp
+++ b/source/cChunkGenerator.cpp
@@ -484,12 +484,32 @@ void cChunkGenerator::DoGenerate(int a_ChunkX, int a_ChunkY, int a_ChunkZ)
cEntityList Entities;
cBlockEntityList BlockEntities;
-
cLuaChunk LuaChunk( BlockTypes, BlockMeta, HeightMap, BiomeMap );
if( cRoot::Get()->GetPluginManager()->CallHook( cPluginManager::E_PLUGIN_CHUNK_GENERATING, 3, a_ChunkX, a_ChunkZ, &LuaChunk ) )
{
- // A plugin interrupted generation, handle something plugin specific?
- //LOG("returned true");
+ // A plugin interrupted generation, handle something plugin specific
+ if( LuaChunk.IsUsingDefaultBiomes() )
+ {
+ m_BiomeGen->GenBiomes(a_ChunkX, a_ChunkZ, BiomeMap);
+ }
+ if( LuaChunk.IsUsingDefaultComposition() )
+ {
+ m_CompositionGen->ComposeTerrain(a_ChunkX, a_ChunkZ, BlockTypes, BlockMeta, HeightMap, BiomeMap, Entities, BlockEntities);
+ }
+ if( LuaChunk.IsUsingDefaultStructures() )
+ {
+ for (cStructureGenList::iterator itr = m_StructureGens.begin(); itr != m_StructureGens.end(); ++itr)
+ {
+ (*itr)->GenStructures(a_ChunkX, a_ChunkZ, BlockTypes, BlockMeta, HeightMap, Entities, BlockEntities);
+ } // for itr - m_StructureGens[]
+ }
+ if( LuaChunk.IsUsingDefaultFinish() )
+ {
+ for (cFinishGenList::iterator itr = m_FinishGens.begin(); itr != m_FinishGens.end(); ++itr)
+ {
+ (*itr)->GenFinish(a_ChunkX, a_ChunkZ, BlockTypes, BlockMeta, HeightMap, BiomeMap, Entities, BlockEntities);
+ } // for itr - m_FinishGens[]
+ }
}
else
{