mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-18 02:45:21 +02:00
Mapgen flags: Add 'biomes' global mapgen flag (#7355)
Previously the only way to disable biomes was to 'clear' the registered biomes in a mod, but this method causes large amounts of unnecessary processing: 1. Calculation of 4 2D noises. 2. Looping through all nodes of a mapchunk replacing nodes with identical nodes. The new flag disables those operations.
This commit is contained in:
@@ -231,7 +231,8 @@ void MapgenValleys::makeChunk(BlockMakeData *data)
|
||||
updateHeightmap(node_min, node_max);
|
||||
|
||||
// Place biome-specific nodes and build biomemap
|
||||
generateBiomes();
|
||||
if (flags & MG_BIOMES)
|
||||
generateBiomes();
|
||||
|
||||
// Generate tunnels, caverns and large randomwalk caves
|
||||
if (flags & MG_CAVES) {
|
||||
@@ -265,7 +266,8 @@ void MapgenValleys::makeChunk(BlockMakeData *data)
|
||||
m_emerge->oremgr->placeAllOres(this, blockseed, node_min, node_max);
|
||||
|
||||
// Sprinkle some dust on top after everything else was generated
|
||||
dustTopNodes();
|
||||
if (flags & MG_BIOMES)
|
||||
dustTopNodes();
|
||||
|
||||
updateLiquid(&data->transforming_liquid, full_node_min, full_node_max);
|
||||
|
||||
|
Reference in New Issue
Block a user