X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=mods%2Fdefault%2Fmapgen.lua;h=016d58de59fe67a99944eefd5f932829750a1ebe;hb=8114c3dbabfeb769d4f4f101df4974e8ffae75e2;hp=1cb31f5c909f2e236276db834ddf993a44028618;hpb=41c1e99b1f4ce34ff42d239d69d4ad840a1b5dc9;p=oweals%2Fminetest_game.git diff --git a/mods/default/mapgen.lua b/mods/default/mapgen.lua index 1cb31f5c..016d58de 100644 --- a/mods/default/mapgen.lua +++ b/mods/default/mapgen.lua @@ -50,15 +50,15 @@ function default.register_ores() -- Clay minetest.register_ore({ - ore_type = "blob", - ore = "default:clay", - wherein = {"default:sand"}, - clust_scarcity = 16 * 16 * 16, - clust_size = 5, - y_min = -15, - y_max = 0, - noise_threshhold = 0.0, - noise_params = { + ore_type = "blob", + ore = "default:clay", + wherein = {"default:sand"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_min = -15, + y_max = 0, + noise_threshold = 0.0, + noise_params = { offset = 0.5, scale = 0.2, spread = {x = 5, y = 5, z = 5}, @@ -71,15 +71,16 @@ function default.register_ores() -- Sand minetest.register_ore({ - ore_type = "blob", - ore = "default:sand", - wherein = {"default:stone"}, - clust_scarcity = 16 * 16 * 16, - clust_size = 5, - y_min = -31, - y_max = 4, - noise_threshhold = 0.0, - noise_params = { + ore_type = "blob", + ore = "default:sand", + wherein = {"default:stone", "default:sandstone", + "default:desert_stone"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_min = -31, + y_max = 4, + noise_threshold = 0.0, + noise_params = { offset = 0.5, scale = 0.2, spread = {x = 5, y = 5, z = 5}, @@ -92,15 +93,15 @@ function default.register_ores() -- Dirt minetest.register_ore({ - ore_type = "blob", - ore = "default:dirt", - wherein = {"default:stone"}, - clust_scarcity = 16 * 16 * 16, - clust_size = 5, - y_min = -31, - y_max = 31000, - noise_threshhold = 0.0, - noise_params = { + ore_type = "blob", + ore = "default:dirt", + wherein = {"default:stone", "default:sandstone"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_min = -31, + y_max = 31000, + noise_threshold = 0.0, + noise_params = { offset = 0.5, scale = 0.2, spread = {x = 5, y = 5, z = 5}, @@ -113,15 +114,15 @@ function default.register_ores() -- Gravel minetest.register_ore({ - ore_type = "blob", - ore = "default:gravel", - wherein = {"default:stone"}, - clust_scarcity = 16 * 16 * 16, - clust_size = 5, - y_min = -31000, - y_max = 31000, - noise_threshhold = 0.0, - noise_params = { + ore_type = "blob", + ore = "default:gravel", + wherein = {"default:stone"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_min = -31000, + y_max = 31000, + noise_threshold = 0.0, + noise_params = { offset = 0.5, scale = 0.2, spread = {x = 5, y = 5, z = 5}, @@ -335,7 +336,7 @@ function default.register_biomes() node_river_water = "default:ice", y_min = -8, y_max = 31000, - heat_point = -5, + heat_point = 0, humidity_point = 50, }) @@ -345,7 +346,7 @@ function default.register_biomes() node_top = "default:sand", depth_top = 1, node_filler = "default:sand", - depth_filler = 2, + depth_filler = 3, --node_stone = "", --node_water_top = "", --depth_water_top = , @@ -353,7 +354,7 @@ function default.register_biomes() --node_river_water = "", y_min = -112, y_max = -9, - heat_point = -5, + heat_point = 0, humidity_point = 50, }) @@ -361,11 +362,11 @@ function default.register_biomes() minetest.register_biome({ name = "tundra", - node_dust = "default:snow", + --node_dust = "", node_top = "default:dirt_with_snow", depth_top = 1, node_filler = "default:dirt", - depth_filler = 0, + depth_filler = 1, --node_stone = "", --node_water_top = "", --depth_water_top = , @@ -373,8 +374,26 @@ function default.register_biomes() --node_river_water = "", y_min = 2, y_max = 31000, - heat_point = 20, - humidity_point = 25, + heat_point = 15, + humidity_point = 35, + }) + + minetest.register_biome({ + name = "tundra_beach", + --node_dust = "", + node_top = "default:gravel", + depth_top = 1, + node_filler = "default:gravel", + depth_filler = 2, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + --node_river_water = "", + y_min = -3, + y_max = 1, + heat_point = 15, + humidity_point = 35, }) minetest.register_biome({ @@ -383,26 +402,26 @@ function default.register_biomes() node_top = "default:sand", depth_top = 1, node_filler = "default:sand", - depth_filler = 2, + depth_filler = 3, --node_stone = "", --node_water_top = "", --depth_water_top = , --node_water = "", --node_river_water = "", y_min = -112, - y_max = 1, - heat_point = 20, - humidity_point = 25, + y_max = -4, + heat_point = 15, + humidity_point = 35, }) minetest.register_biome({ name = "taiga", node_dust = "default:snow", - node_top = "default:snowblock", + node_top = "default:dirt_with_snow", depth_top = 1, node_filler = "default:dirt", - depth_filler = 2, + depth_filler = 3, --node_stone = "", --node_water_top = "", --depth_water_top = , @@ -410,8 +429,8 @@ function default.register_biomes() --node_river_water = "", y_min = 2, y_max = 31000, - heat_point = 20, - humidity_point = 75, + heat_point = 15, + humidity_point = 65, }) minetest.register_biome({ @@ -420,7 +439,7 @@ function default.register_biomes() node_top = "default:sand", depth_top = 1, node_filler = "default:sand", - depth_filler = 2, + depth_filler = 3, --node_stone = "", --node_water_top = "", --depth_water_top = , @@ -428,8 +447,8 @@ function default.register_biomes() --node_river_water = "", y_min = -112, y_max = 1, - heat_point = 20, - humidity_point = 75, + heat_point = 15, + humidity_point = 65, }) -- Temperate @@ -440,20 +459,20 @@ function default.register_biomes() node_top = "default:dirt_with_grass", depth_top = 1, node_filler = "default:dirt", - depth_filler = 0, + depth_filler = 1, --node_stone = "", --node_water_top = "", --depth_water_top = , --node_water = "", --node_river_water = "", - y_min = 5, + y_min = 6, y_max = 31000, - heat_point = 45, - humidity_point = 25, + heat_point = 40, + humidity_point = 35, }) minetest.register_biome({ - name = "stone_grassland_ocean", + name = "stone_grassland_dunes", --node_dust = "", node_top = "default:sand", depth_top = 1, @@ -464,10 +483,28 @@ function default.register_biomes() --depth_water_top = , --node_water = "", --node_river_water = "", + y_min = 5, + y_max = 5, + heat_point = 40, + humidity_point = 35, + }) + + minetest.register_biome({ + name = "stone_grassland_ocean", + --node_dust = "", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + --node_river_water = "", y_min = -112, y_max = 4, - heat_point = 45, - humidity_point = 25, + heat_point = 40, + humidity_point = 35, }) @@ -477,16 +514,34 @@ function default.register_biomes() node_top = "default:dirt_with_grass", depth_top = 1, node_filler = "default:dirt", - depth_filler = 2, + depth_filler = 3, --node_stone = "", --node_water_top = "", --depth_water_top = , --node_water = "", --node_river_water = "", - y_min = 5, + y_min = 6, y_max = 31000, - heat_point = 45, - humidity_point = 75, + heat_point = 40, + humidity_point = 65, + }) + + minetest.register_biome({ + name = "coniferous_forest_dunes", + --node_dust = "", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + --node_river_water = "", + y_min = 5, + y_max = 5, + heat_point = 40, + humidity_point = 65, }) minetest.register_biome({ @@ -495,7 +550,7 @@ function default.register_biomes() node_top = "default:sand", depth_top = 1, node_filler = "default:sand", - depth_filler = 2, + depth_filler = 3, --node_stone = "", --node_water_top = "", --depth_water_top = , @@ -503,8 +558,8 @@ function default.register_biomes() --node_river_water = "", y_min = -112, y_max = 4, - heat_point = 45, - humidity_point = 75, + heat_point = 40, + humidity_point = 65, }) @@ -514,20 +569,20 @@ function default.register_biomes() node_top = "default:dirt_with_grass", depth_top = 1, node_filler = "default:dirt", - depth_filler = 0, + depth_filler = 1, node_stone = "default:sandstone", --node_water_top = "", --depth_water_top = , --node_water = "", --node_river_water = "", - y_min = 5, + y_min = 6, y_max = 31000, - heat_point = 70, - humidity_point = 25, + heat_point = 60, + humidity_point = 35, }) minetest.register_biome({ - name = "sandstone_grassland_ocean", + name = "sandstone_grassland_dunes", --node_dust = "", node_top = "default:sand", depth_top = 1, @@ -538,10 +593,28 @@ function default.register_biomes() --depth_water_top = , --node_water = "", --node_river_water = "", + y_min = 5, + y_max = 5, + heat_point = 60, + humidity_point = 35, + }) + + minetest.register_biome({ + name = "sandstone_grassland_ocean", + --node_dust = "", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_stone = "default:sandstone", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + --node_river_water = "", y_min = -112, y_max = 4, - heat_point = 70, - humidity_point = 25, + heat_point = 60, + humidity_point = 35, }) @@ -551,7 +624,7 @@ function default.register_biomes() node_top = "default:dirt_with_grass", depth_top = 1, node_filler = "default:dirt", - depth_filler = 2, + depth_filler = 3, --node_stone = "", --node_water_top = "", --depth_water_top = , @@ -559,8 +632,8 @@ function default.register_biomes() --node_river_water = "", y_min = 1, y_max = 31000, - heat_point = 70, - humidity_point = 75, + heat_point = 60, + humidity_point = 65, }) minetest.register_biome({ @@ -569,7 +642,7 @@ function default.register_biomes() node_top = "default:dirt", depth_top = 1, node_filler = "default:dirt", - depth_filler = 2, + depth_filler = 3, --node_stone = "", --node_water_top = "", --depth_water_top = , @@ -577,8 +650,8 @@ function default.register_biomes() --node_river_water = "", y_min = -3, y_max = 0, - heat_point = 70, - humidity_point = 75, + heat_point = 60, + humidity_point = 65, }) minetest.register_biome({ @@ -587,7 +660,7 @@ function default.register_biomes() node_top = "default:sand", depth_top = 1, node_filler = "default:sand", - depth_filler = 2, + depth_filler = 3, --node_stone = "", --node_water_top = "", --depth_water_top = , @@ -595,8 +668,8 @@ function default.register_biomes() --node_river_water = "", y_min = -112, y_max = -4, - heat_point = 70, - humidity_point = 75, + heat_point = 60, + humidity_point = 65, }) -- Hot @@ -615,8 +688,8 @@ function default.register_biomes() --node_river_water = "", y_min = 5, y_max = 31000, - heat_point = 95, - humidity_point = 10, + heat_point = 85, + humidity_point = 20, }) minetest.register_biome({ @@ -625,7 +698,7 @@ function default.register_biomes() node_top = "default:sand", depth_top = 1, node_filler = "default:sand", - depth_filler = 2, + depth_filler = 3, node_stone = "default:desert_stone", --node_water_top = "", --depth_water_top = , @@ -633,8 +706,8 @@ function default.register_biomes() --node_river_water = "", y_min = -112, y_max = 4, - heat_point = 95, - humidity_point = 10, + heat_point = 85, + humidity_point = 20, }) @@ -652,7 +725,7 @@ function default.register_biomes() --node_river_water = "", y_min = 1, y_max = 31000, - heat_point = 95, + heat_point = 85, humidity_point = 50, }) @@ -662,7 +735,7 @@ function default.register_biomes() node_top = "default:dirt", depth_top = 1, node_filler = "default:dirt", - depth_filler = 2, + depth_filler = 3, --node_stone = "", --node_water_top = "", --depth_water_top = , @@ -670,7 +743,7 @@ function default.register_biomes() --node_river_water = "", y_min = -3, y_max = 0, - heat_point = 95, + heat_point = 85, humidity_point = 50, }) @@ -680,7 +753,7 @@ function default.register_biomes() node_top = "default:sand", depth_top = 1, node_filler = "default:sand", - depth_filler = 2, + depth_filler = 3, --node_stone = "", --node_water_top = "", --depth_water_top = , @@ -688,7 +761,7 @@ function default.register_biomes() --node_river_water = "", y_min = -112, y_max = -4, - heat_point = 95, + heat_point = 85, humidity_point = 50, }) @@ -699,7 +772,7 @@ function default.register_biomes() node_top = "default:dirt_with_grass", depth_top = 1, node_filler = "default:dirt", - depth_filler = 2, + depth_filler = 3, --node_stone = "", --node_water_top = "", --depth_water_top = , @@ -707,8 +780,8 @@ function default.register_biomes() --node_river_water = "", y_min = 1, y_max = 31000, - heat_point = 95, - humidity_point = 90, + heat_point = 85, + humidity_point = 80, }) minetest.register_biome({ @@ -717,7 +790,7 @@ function default.register_biomes() node_top = "default:dirt", depth_top = 1, node_filler = "default:dirt", - depth_filler = 2, + depth_filler = 3, --node_stone = "", --node_water_top = "", --depth_water_top = , @@ -725,8 +798,8 @@ function default.register_biomes() --node_river_water = "", y_min = -3, y_max = 0, - heat_point = 95, - humidity_point = 90, + heat_point = 85, + humidity_point = 80, }) minetest.register_biome({ @@ -735,7 +808,7 @@ function default.register_biomes() node_top = "default:sand", depth_top = 1, node_filler = "default:sand", - depth_filler = 2, + depth_filler = 3, --node_stone = "", --node_water_top = "", --depth_water_top = , @@ -743,8 +816,8 @@ function default.register_biomes() --node_river_water = "", y_min = -112, y_max = -4, - heat_point = 95, - humidity_point = 90, + heat_point = 85, + humidity_point = 80, }) -- Underground @@ -783,7 +856,7 @@ function default.register_mgv6_decorations() minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass"}, - sidelen = 8, + sidelen = 16, noise_params = { offset = -0.3, scale = 0.7, @@ -879,7 +952,9 @@ local function register_grass_decoration(offset, scale, length) persist = 0.6 }, biomes = {"stone_grassland", "sandstone_grassland", - "deciduous_forest", "coniferous_forest"}, + "deciduous_forest", "coniferous_forest", + "stone_grassland_dunes", "sandstone_grassland_dunes", + "coniferous_forest_dunes"}, y_min = 1, y_max = 31000, decoration = "default:grass_"..length, @@ -909,15 +984,15 @@ end function default.register_decorations() minetest.clear_registered_decorations() - -- Apple tree + -- Apple tree and log minetest.register_decoration({ deco_type = "schematic", place_on = {"default:dirt_with_grass"}, sidelen = 16, noise_params = { - offset = 0.04, - scale = 0.02, + offset = 0.036, + scale = 0.022, spread = {x = 250, y = 250, z = 250}, seed = 2, octaves = 3, @@ -930,13 +1005,46 @@ function default.register_decorations() flags = "place_center_x, place_center_z", }) - -- Jungle tree + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.0018, + scale = 0.0011, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest"}, + y_min = 1, + y_max = 31000, + schematic = { + size = {x = 3, y = 3, z = 1}, + data = { + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "default:tree", param2 = 12, prob = 191}, + {name = "default:tree", param2 = 12}, + {name = "default:tree", param2 = 12, prob = 127}, + {name = "air", prob = 0}, + {name = "flowers:mushroom_brown", prob = 63}, + {name = "air", prob = 0}, + }, + }, + flags = "place_center_x", + rotation = "random", + }) + + -- Jungle tree and log minetest.register_decoration({ deco_type = "schematic", place_on = {"default:dirt_with_grass", "default:dirt"}, sidelen = 80, - fill_ratio = 0.09, + fill_ratio = 0.1, biomes = {"rainforest", "rainforest_swamp"}, y_min = 0, y_max = 31000, @@ -945,15 +1053,41 @@ function default.register_decorations() rotation = "random", }) - -- Taiga and temperate forest pine tree + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_grass", "default:dirt"}, + sidelen = 80, + fill_ratio = 0.005, + biomes = {"rainforest", "rainforest_swamp"}, + y_min = 1, + y_max = 31000, + schematic = { + size = {x = 3, y = 3, z = 1}, + data = { + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "default:jungletree", param2 = 12, prob = 191}, + {name = "default:jungletree", param2 = 12}, + {name = "default:jungletree", param2 = 12, prob = 127}, + {name = "air", prob = 0}, + {name = "flowers:mushroom_brown", prob = 127}, + {name = "air", prob = 0}, + }, + }, + flags = "place_center_x", + rotation = "random", + }) + + -- Taiga and temperate coniferous forest pine tree and log minetest.register_decoration({ deco_type = "schematic", - place_on = {"default:snowblock", "default:dirt_with_grass"}, + place_on = {"default:dirt_with_snow", "default:dirt_with_grass"}, sidelen = 16, noise_params = { - offset = 0.04, - scale = 0.02, + offset = 0.036, + scale = 0.022, spread = {x = 250, y = 250, z = 250}, seed = 2, octaves = 3, @@ -966,15 +1100,48 @@ function default.register_decorations() flags = "place_center_x, place_center_z", }) - -- Acacia tree + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_snow", "default:dirt_with_grass"}, + sidelen = 80, + noise_params = { + offset = 0.0018, + scale = 0.0011, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"taiga", "coniferous_forest"}, + y_min = 1, + y_max = 31000, + schematic = { + size = {x = 3, y = 3, z = 1}, + data = { + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "default:pine_tree", param2 = 12, prob = 191}, + {name = "default:pine_tree", param2 = 12}, + {name = "default:pine_tree", param2 = 12, prob = 127}, + {name = "air", prob = 0}, + {name = "flowers:mushroom_red", prob = 63}, + {name = "air", prob = 0}, + }, + }, + flags = "place_center_x", + rotation = "random", + }) + + -- Acacia tree and log minetest.register_decoration({ deco_type = "schematic", place_on = {"default:dirt_with_dry_grass"}, - sidelen = 80, + sidelen = 16, noise_params = { offset = 0, - scale = 0.003, + scale = 0.002, spread = {x = 250, y = 250, z = 250}, seed = 2, octaves = 3, @@ -988,15 +1155,98 @@ function default.register_decorations() rotation = "random", }) + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.001, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"savanna"}, + y_min = 1, + y_max = 31000, + schematic = { + size = {x = 3, y = 2, z = 1}, + data = { + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "default:acacia_tree", param2 = 12, prob = 191}, + {name = "default:acacia_tree", param2 = 12}, + {name = "default:acacia_tree", param2 = 12, prob = 127}, + }, + }, + flags = "place_center_x", + rotation = "random", + }) + + -- Aspen tree and log + + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.0, + scale = -0.015, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest"}, + y_min = 1, + y_max = 31000, + schematic = minetest.get_modpath("default").."/schematics/aspen_tree.mts", + flags = "place_center_x, place_center_z", + }) + + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.0, + scale = -0.0008, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest"}, + y_min = 1, + y_max = 31000, + schematic = { + size = {x = 3, y = 3, z = 1}, + data = { + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "air", prob = 0}, + {name = "default:aspen_tree", param2 = 12}, + {name = "default:aspen_tree", param2 = 12}, + {name = "default:aspen_tree", param2 = 12, prob = 127}, + {name = "flowers:mushroom_red", prob = 63}, + {name = "flowers:mushroom_brown", prob = 63}, + {name = "air", prob = 0}, + }, + }, + flags = "place_center_x", + rotation = "random", + }) -- Large cactus minetest.register_decoration({ deco_type = "schematic", place_on = {"default:desert_sand"}, - sidelen = 80, + sidelen = 16, noise_params = { - offset = -0.0005, - scale = 0.0015, + offset = -0.0003, + scale = 0.0009, spread = {x = 200, y = 200, z = 200}, seed = 230, octaves = 3, @@ -1015,10 +1265,10 @@ function default.register_decorations() minetest.register_decoration({ deco_type = "simple", place_on = {"default:desert_sand"}, - sidelen = 80, + sidelen = 16, noise_params = { - offset = -0.0005, - scale = 0.0015, + offset = -0.0003, + scale = 0.0009, spread = {x = 200, y = 200, z = 200}, seed = 230, octaves = 3, @@ -1168,8 +1418,8 @@ if mg_params.mgname == "v6" then default.register_mgv6_decorations() minetest.register_on_generated(default.generate_nyancats) elseif mg_params.mgname ~= "singlenode" then - default.register_ores() default.register_biomes() + default.register_ores() default.register_decorations() minetest.register_on_generated(default.generate_nyancats) end