X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=mods%2Fdefault%2Fmapgen.lua;h=3424a557b0ccd8deb1482b3a50871fe9d4a5fd44;hb=28884cc784626544871bd28032130899393c74e9;hp=152125a8d856f098eba88eea27f4df2cf310cf77;hpb=c3a1545ca1dda4b94bfecc281097ab0cdc3e565b;p=oweals%2Fminetest_game.git diff --git a/mods/default/mapgen.lua b/mods/default/mapgen.lua index 152125a8..3424a557 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, + 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 = { + 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, + 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 = { + 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, + 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 = { + 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, + 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 = { + noise_params = { offset = 0.5, scale = 0.2, spread = {x = 5, y = 5, z = 5}, @@ -377,6 +378,24 @@ function default.register_biomes() 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({ name = "tundra_ocean", --node_dust = "", @@ -390,7 +409,7 @@ function default.register_biomes() --node_water = "", --node_river_water = "", y_min = -112, - y_max = 1, + y_max = -4, heat_point = 15, humidity_point = 35, }) @@ -965,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, @@ -986,7 +1005,40 @@ 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", @@ -1001,15 +1053,41 @@ function default.register_decorations() rotation = "random", }) - -- Taiga and temperate coniferous forest pine tree + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_grass", "default:dirt"}, + sidelen = 80, + fill_ratio = 0.01, + 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: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, @@ -1022,7 +1100,40 @@ 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", @@ -1044,6 +1155,90 @@ 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", + rotation = "random", + }) + + 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({ @@ -1224,8 +1419,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