mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Biome API / dungeons: Add biome-defined dungeon nodes
Add new biome fields 'node_dungeon', 'node_dungeon_alt', 'node_dungeon_stair'. If 'node_dungeon' is not defined dungeons fall back to classic behaviour. Remove messy and imprecise dungeon material code from 'generateBiomes()'. Code deciding dungeon materials is now in 'generateDungeons()' and uses the biome at mapchunk centre for more precision. Remove hardcoded 'MG_STONE' types as long intended.
This commit is contained in:
parent
460b375cad
commit
746ca41f58
12 changed files with 97 additions and 97 deletions
|
@ -196,17 +196,14 @@ void MapgenFlat::makeChunk(BlockMakeData *data)
|
|||
|
||||
// Init biome generator, place biome-specific nodes, and build biomemap
|
||||
biomegen->calcBiomeNoise(node_min);
|
||||
|
||||
MgStoneType mgstone_type;
|
||||
content_t biome_stone;
|
||||
generateBiomes(&mgstone_type, &biome_stone);
|
||||
generateBiomes();
|
||||
|
||||
if (flags & MG_CAVES)
|
||||
generateCaves(stone_surface_max_y, large_cave_depth);
|
||||
|
||||
if ((flags & MG_DUNGEONS) && full_node_min.Y >= dungeon_ymin &&
|
||||
full_node_max.Y <= dungeon_ymax)
|
||||
generateDungeons(stone_surface_max_y, mgstone_type, biome_stone);
|
||||
generateDungeons(stone_surface_max_y);
|
||||
|
||||
// Generate the registered decorations
|
||||
if (flags & MG_DECORATIONS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue