MCPcopy Create free account
hub / github.com/cuberite/cuberite / DoGenerate

Method DoGenerate

src/Generating/ComposableGenerator.cpp:183–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181
182
183void cComposableGenerator::DoGenerate(int a_ChunkX, int a_ChunkZ, cChunkDesc & a_ChunkDesc)
184{
185 if (a_ChunkDesc.IsUsingDefaultBiomes())
186 {
187 m_BiomeGen->GenBiomes(a_ChunkX, a_ChunkZ, a_ChunkDesc.GetBiomeMap());
188 }
189
190 if (a_ChunkDesc.IsUsingDefaultHeight())
191 {
192 m_HeightGen->GenHeightMap(a_ChunkX, a_ChunkZ, a_ChunkDesc.GetHeightMap());
193 }
194
195 bool ShouldUpdateHeightmap = false;
196 if (a_ChunkDesc.IsUsingDefaultComposition())
197 {
198 m_CompositionGen->ComposeTerrain(a_ChunkDesc);
199 ShouldUpdateHeightmap = true;
200 }
201
202 if (a_ChunkDesc.IsUsingDefaultFinish())
203 {
204 for (cFinishGenList::iterator itr = m_FinishGens.begin(); itr != m_FinishGens.end(); ++itr)
205 {
206 (*itr)->GenFinish(a_ChunkDesc);
207 } // for itr - m_FinishGens[]
208 ShouldUpdateHeightmap = true;
209 }
210
211 if (ShouldUpdateHeightmap)
212 {
213 a_ChunkDesc.UpdateHeightmap();
214 }
215}
216
217
218

Callers

nothing calls this directly

Calls 11

IsUsingDefaultBiomesMethod · 0.80
GenBiomesMethod · 0.80
IsUsingDefaultHeightMethod · 0.80
IsUsingDefaultFinishMethod · 0.80
beginMethod · 0.80
endMethod · 0.80
GenHeightMapMethod · 0.45
ComposeTerrainMethod · 0.45
GenFinishMethod · 0.45
UpdateHeightmapMethod · 0.45

Tested by

no test coverage detected