Change mapgen order to ores > dungeons > decorations (#7656)

Previously dungeons > decorations > ores.
Decorations depend on the node they are placed on, and ore types are
increasingly able to place large continuous volumes of nodes, such as
strata. Decorations are increasingly being used underground.

The new order avoids a node being changed by ore generation after a
decoration has been placed on it.
The new order also avoids ores appearing in the walls of a dungeon if
the wall nodes match the local stone node.
master
Paramat 2018-08-20 18:24:53 +01:00 committed by GitHub
parent 5a26e46aaa
commit 8516f28458
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 18 deletions

View File

@ -273,6 +273,9 @@ void MapgenCarpathian::makeChunk(BlockMakeData *data)
generateCavesRandomWalk(stone_surface_max_y, large_cave_depth);
}
// Generate the registered ores
m_emerge->oremgr->placeAllOres(this, blockseed, node_min, node_max);
// Generate dungeons
if ((flags & MG_DUNGEONS) && full_node_min.Y >= dungeon_ymin &&
full_node_max.Y <= dungeon_ymax)
@ -282,9 +285,6 @@ void MapgenCarpathian::makeChunk(BlockMakeData *data)
if (flags & MG_DECORATIONS)
m_emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
// Generate the registered ores
m_emerge->oremgr->placeAllOres(this, blockseed, node_min, node_max);
// Sprinkle some dust on top after everything else was generated
if (flags & MG_BIOMES)
dustTopNodes();

View File

@ -207,6 +207,9 @@ void MapgenFlat::makeChunk(BlockMakeData *data)
generateCavesRandomWalk(stone_surface_max_y, large_cave_depth);
}
// Generate the registered ores
m_emerge->oremgr->placeAllOres(this, blockseed, node_min, node_max);
if ((flags & MG_DUNGEONS) && full_node_min.Y >= dungeon_ymin &&
full_node_max.Y <= dungeon_ymax)
generateDungeons(stone_surface_max_y);
@ -215,9 +218,6 @@ void MapgenFlat::makeChunk(BlockMakeData *data)
if (flags & MG_DECORATIONS)
m_emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
// Generate the registered ores
m_emerge->oremgr->placeAllOres(this, blockseed, node_min, node_max);
// Sprinkle some dust on top after everything else was generated
if (flags & MG_BIOMES)
dustTopNodes();

View File

@ -218,6 +218,9 @@ void MapgenFractal::makeChunk(BlockMakeData *data)
generateCavesRandomWalk(stone_surface_max_y, large_cave_depth);
}
// Generate the registered ores
m_emerge->oremgr->placeAllOres(this, blockseed, node_min, node_max);
if ((flags & MG_DUNGEONS) && full_node_min.Y >= dungeon_ymin &&
full_node_max.Y <= dungeon_ymax)
generateDungeons(stone_surface_max_y);
@ -226,9 +229,6 @@ void MapgenFractal::makeChunk(BlockMakeData *data)
if (flags & MG_DECORATIONS)
m_emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
// Generate the registered ores
m_emerge->oremgr->placeAllOres(this, blockseed, node_min, node_max);
// Sprinkle some dust on top after everything else was generated
if (flags & MG_BIOMES)
dustTopNodes();

View File

@ -232,6 +232,9 @@ void MapgenV5::makeChunk(BlockMakeData *data)
generateCavesRandomWalk(stone_surface_max_y, large_cave_depth);
}
// Generate the registered ores
m_emerge->oremgr->placeAllOres(this, blockseed, node_min, node_max);
// Generate dungeons and desert temples
if ((flags & MG_DUNGEONS) && full_node_min.Y >= dungeon_ymin &&
full_node_max.Y <= dungeon_ymax)
@ -241,9 +244,6 @@ void MapgenV5::makeChunk(BlockMakeData *data)
if (flags & MG_DECORATIONS)
m_emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
// Generate the registered ores
m_emerge->oremgr->placeAllOres(this, blockseed, node_min, node_max);
// Sprinkle some dust on top after everything else was generated
if (flags & MG_BIOMES)
dustTopNodes();

View File

@ -352,6 +352,9 @@ void MapgenV7::makeChunk(BlockMakeData *data)
generateCavesRandomWalk(stone_surface_max_y, large_cave_depth);
}
// Generate the registered ores
m_emerge->oremgr->placeAllOres(this, blockseed, node_min, node_max);
// Generate dungeons
if ((flags & MG_DUNGEONS) && full_node_min.Y >= dungeon_ymin &&
full_node_max.Y <= dungeon_ymax)
@ -361,9 +364,6 @@ void MapgenV7::makeChunk(BlockMakeData *data)
if (flags & MG_DECORATIONS)
m_emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
// Generate the registered ores
m_emerge->oremgr->placeAllOres(this, blockseed, node_min, node_max);
// Sprinkle some dust on top after everything else was generated
if (flags & MG_BIOMES)
dustTopNodes();

View File

@ -253,6 +253,9 @@ void MapgenValleys::makeChunk(BlockMakeData *data)
generateCavesRandomWalk(stone_surface_max_y, large_cave_depth);
}
// Generate the registered ores
m_emerge->oremgr->placeAllOres(this, blockseed, node_min, node_max);
// Dungeon creation
if ((flags & MG_DUNGEONS) && full_node_min.Y >= dungeon_ymin &&
full_node_max.Y <= dungeon_ymax)
@ -262,9 +265,6 @@ void MapgenValleys::makeChunk(BlockMakeData *data)
if (flags & MG_DECORATIONS)
m_emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
// Generate the registered ores
m_emerge->oremgr->placeAllOres(this, blockseed, node_min, node_max);
// Sprinkle some dust on top after everything else was generated
if (flags & MG_BIOMES)
dustTopNodes();