]> git.lizzy.rs Git - minetest.git/blobdiff - src/mapgen_v6.cpp
Biome API: Make fallback biome stone and water, disable filler
[minetest.git] / src / mapgen_v6.cpp
index a6beb710b6ca5d9f991e5b168484367389ec5966..9e34aac2d741faa54ea54a15c8e3c116a818985b 100644 (file)
@@ -28,7 +28,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "nodedef.h"
 #include "content_mapnode.h" // For content_mapnode_get_new_name
 #include "voxelalgorithms.h"
-#include "profiler.h"
 #include "settings.h" // For g_settings
 #include "emerge.h"
 #include "dungeongen.h"
@@ -108,6 +107,14 @@ MapgenV6::MapgenV6(int mapgenid, MapgenParams *params, EmergeManager *emerge)
                c_mossycobble = c_cobble;
        if (c_stair_cobble == CONTENT_IGNORE)
                c_stair_cobble = c_cobble;
+       if (c_dirt_with_snow == CONTENT_IGNORE)
+               c_dirt_with_snow = c_dirt_with_grass;
+       if (c_snow == CONTENT_IGNORE)
+               c_snow = CONTENT_AIR;
+       if (c_snowblock == CONTENT_IGNORE)
+               c_snowblock = c_dirt_with_grass;
+       if (c_ice == CONTENT_IGNORE)
+               c_ice = c_water_source;
 }
 
 
@@ -138,9 +145,9 @@ MapgenV6Params::MapgenV6Params()
        np_height_select  = NoiseParams(0,    1.0,  v3f(250.0, 250.0, 250.0), 4213,   5, 0.69, 2.0);
        np_mud            = NoiseParams(4,    2.0,  v3f(200.0, 200.0, 200.0), 91013,  3, 0.55, 2.0);
        np_beach          = NoiseParams(0,    1.0,  v3f(250.0, 250.0, 250.0), 59420,  3, 0.50, 2.0);
-       np_biome          = NoiseParams(0,    1.0,  v3f(250.0, 250.0, 250.0), 9130,   3, 0.50, 2.0);
+       np_biome          = NoiseParams(0,    1.0,  v3f(500.0, 500.0, 500.0), 9130,   3, 0.50, 2.0);
        np_cave           = NoiseParams(6,    6.0,  v3f(250.0, 250.0, 250.0), 34329,  3, 0.50, 2.0);
-       np_humidity       = NoiseParams(0.5,  0.5,  v3f(500.0, 500.0, 500.0), 72384,  4, 0.66, 2.0);
+       np_humidity       = NoiseParams(0.5,  0.5,  v3f(500.0, 500.0, 500.0), 72384,  3, 0.50, 2.0);
        np_trees          = NoiseParams(0,    1.0,  v3f(125.0, 125.0, 125.0), 2,      4, 0.66, 2.0);
        np_apple_trees    = NoiseParams(0,    1.0,  v3f(100.0, 100.0, 100.0), 342902, 3, 0.45, 2.0);
 }
@@ -619,7 +626,7 @@ int MapgenV6::generateGround()
        MapNode n_air(CONTENT_AIR), n_water_source(c_water_source);
        MapNode n_stone(c_stone), n_desert_stone(c_desert_stone);
        MapNode n_ice(c_ice);
-       int stone_surface_max_y = -MAP_GENERATION_LIMIT;
+       int stone_surface_max_y = -MAX_MAP_GENERATION_LIMIT;
 
        u32 index = 0;
        for (s16 z = node_min.Z; z <= node_max.Z; z++)
@@ -1007,7 +1014,7 @@ void MapgenV6::growGrass() // Add surface nodes
                        } else if (bt == BT_TUNDRA) {
                                if (c == c_dirt) {
                                        vm->m_data[i] = n_dirt_with_snow;
-                               } else if (c == c_stone) {
+                               } else if (c == c_stone && surface_y < node_max.Y) {
                                        vm->m_area.add_y(em, i, 1);
                                        vm->m_data[i] = n_snow;
                                }