summaryrefslogtreecommitdiff
path: root/src/mapgen_v6.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapgen_v6.cpp')
-rw-r--r--src/mapgen_v6.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/mapgen_v6.cpp b/src/mapgen_v6.cpp
index 1efa3ad74..0b419617d 100644
--- a/src/mapgen_v6.cpp
+++ b/src/mapgen_v6.cpp
@@ -64,9 +64,10 @@ NoiseParams nparams_v6_def_apple_trees =
///////////////////////////////////////////////////////////////////////////////
-MapgenV6::MapgenV6(int mapgenid, MapgenV6Params *params) {
+MapgenV6::MapgenV6(int mapgenid, MapgenV6Params *params, EmergeManager *emerge) {
this->generating = false;
this->id = mapgenid;
+ this->emerge = emerge;
this->seed = (int)params->seed;
this->water_level = params->water_level;
@@ -463,6 +464,12 @@ void MapgenV6::makeChunk(BlockMakeData *data) {
if (flags & MG_TREES)
placeTreesAndJungleGrass();
+ // Generate the registered ores
+ for (unsigned int i = 0; i != emerge->ores.size(); i++) {
+ Ore *ore = emerge->ores[i];
+ ore->generate(this, blockseed + i, node_min, node_max);
+ }
+
// Calculate lighting
calcLighting(node_min, node_max);
@@ -494,14 +501,13 @@ void MapgenV6::calculateNoise() {
noise_height_select->perlinMap2D(
x + 0.5 * noise_height_select->np->spread.X,
z + 0.5 * noise_height_select->np->spread.Z);
- }
-
- if (!(flags & MG_FLAT)) {
+
noise_mud->perlinMap2D(
x + 0.5 * noise_mud->np->spread.X,
z + 0.5 * noise_mud->np->spread.Z);
noise_mud->transformNoiseMap();
}
+
noise_beach->perlinMap2D(
x + 0.2 * noise_beach->np->spread.X,
z + 0.7 * noise_beach->np->spread.Z);