farlands/mods/mapgen/mapgen.lua

2961 lines
68 KiB
Lua

local seaplants = false
minetest.clear_registered_ores()
-- Blob ores
-- These first to avoid other ores in blobs
--kelp stone
minetest.register_ore({
ore_type = "blob",
ore = "mapgen:stone_with_sea_grass",
wherein = {"default:sand"},
clust_scarcity = 16 * 16 * 16,
clust_size = 8,
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},
seed = -316,
octaves = 1,
persist = 0.0
},
})
-- Clay
-- This first to avoid clay in sand blobs
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_threshold = 0.0,
noise_params = {
offset = 0.5,
scale = 0.2,
spread = {x = 5, y = 5, z = 5},
seed = -316,
octaves = 1,
persist = 0.0
},
})
-- Sand
minetest.register_ore({
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 = 0,
noise_threshold = 0.0,
noise_params = {
offset = 0.5,
scale = 0.2,
spread = {x = 5, y = 5, z = 5},
seed = 2316,
octaves = 1,
persist = 0.0
},
})
-- 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_threshold = 0.0,
noise_params = {
offset = 0.5,
scale = 0.2,
spread = {x = 5, y = 5, z = 5},
seed = 17676,
octaves = 1,
persist = 0.0
},
biomes = {"taiga", "snowy_grassland", "grassland", "coniferous_forest",
"deciduous_forest", "savanna", "rainforest"}
})
minetest.register_ore({
ore_type = "blob",
ore = "mapgen:coarse_dirt",
wherein = {"default:stone"},
clust_scarcity = 8 * 8 * 8,
clust_size = 2,
y_min = -31000,
y_max = -31,
noise_threshold = 0.0,
noise_params = {
offset = 0.4,
scale = 0.2,
spread = {x = 5, y = 5, z = 5},
seed = 17676,
octaves = 1,
persist = 0.0
},
biomes = {"taiga", "snowy_grassland", "grassland", "coniferous_forest",
"deciduous_forest", "savanna", "rainforest"}
})
-- 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_threshold = 0.0,
noise_params = {
offset = 0.5,
scale = 0.2,
spread = {x = 5, y = 5, z = 5},
seed = 766,
octaves = 1,
persist = 0.0
},
})
--swamp water
minetest.register_ore({
ore_type = "blob",
ore = "mapgen:dirty_water_source",
wherein = {"mapgen:dirt_with_swampgrass"},
clust_scarcity = 9 * 9 * 9,
clust_size = 8,
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},
seed = 766,
octaves = 1,
persist = 0.0
},
})
--new stone
minetest.register_ore({
ore_type = "blob",
ore = "mapgen:limestone",
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},
seed = 766,
octaves = 1,
persist = 0.0
},
})
minetest.register_ore({
ore_type = "blob",
ore = "mapgen:granite_brown",
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},
seed = 766,
octaves = 1,
persist = 0.0
},
})
minetest.register_ore({
ore_type = "blob",
ore = "mapgen:granite",
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},
seed = 766,
octaves = 1,
persist = 0.0
},
})
minetest.register_ore({
ore_type = "blob",
ore = "mapgen:dry_dirt",
wherein = {"mapgen:savanna_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},
seed = 766,
octaves = 1,
persist = 0.0
},
})
--dirt with leaves
--[[minetest.register_ore({
ore_type = "blob",
ore = "mapgen:dirt_with_leafygrass",
wherein = {"default:dirt_with_grass"},
clust_scarcity = 5 * 5 * 5,
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},
seed = 766,
octaves = 1,
persist = 0.0
},
biomes = {"bamboo_forest",}
})]]
--coarse dirt
minetest.register_ore({
ore_type = "blob",
ore = "mapgen:coarse_dirt",
wherein = {"mapgen:dirt_with_junglegrass"},
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},
seed = 766,
octaves = 1,
persist = 0.0
},
})
minetest.register_ore({
ore_type = "blob",
ore = "mapgen:coarse_dirt",
wherein = {"mapgen:dirt_with_leafygrass"},
clust_scarcity = 15 * 15 * 15,
clust_size = 3,
y_min = -31000,
y_max = 31000,
noise_threshold = 0.0,
noise_params = {
offset = 0.55,
scale = 0.2,
spread = {x = 5, y = 5, z = 5},
seed = 766,
octaves = 1,
persist = 0.0
},
biomes = {"coniferous_forest_tall",}
})
-- Scatter ores
-- Coal
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_coal",
wherein = "default:stone",
clust_scarcity = 8 * 8 * 8,
clust_num_ores = 9,
clust_size = 3,
y_min = 1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "mapgen:savanna_coal",
wherein = "mapgen:savanna_stone",
clust_scarcity = 8 * 8 * 8,
clust_num_ores = 9,
clust_size = 3,
y_min = -1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "mapgen:savanna_iron",
wherein = "mapgen:savanna_stone",
clust_scarcity = 7 * 7 * 7,
clust_num_ores = 9,
clust_size = 3,
y_min = -1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_coal",
wherein = "default:stone",
clust_scarcity = 8 * 8 * 8,
clust_num_ores = 8,
clust_size = 3,
y_min = -31000,
y_max = 64,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_coal",
wherein = "default:stone",
clust_scarcity = 24 * 24 * 24,
clust_num_ores = 27,
clust_size = 6,
y_min = -31000,
y_max = 0,
})
--Tin
minetest.register_ore({
ore_type = "scatter",
ore = "mapgen:tin_ore",
wherein = "default:stone",
clust_scarcity = 30 * 30 * 30,
clust_num_ores = 12,
clust_size = 3,
y_min = -1000,
y_max = 1025,
})
-- Iron
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_iron",
wherein = "default:stone",
clust_scarcity = 9 * 9 * 9,
clust_num_ores = 12,
clust_size = 3,
y_min = 1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_iron",
wherein = "default:stone",
clust_scarcity = 7 * 7 * 7,
clust_num_ores = 5,
clust_size = 3,
y_min = -31000,
y_max = 0,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_iron",
wherein = "default:stone",
clust_scarcity = 24 * 24 * 24,
clust_num_ores = 27,
clust_size = 6,
y_min = -31000,
y_max = -64,
})
-- Copper
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_copper",
wherein = "default:stone",
clust_scarcity = 9 * 9 * 9,
clust_num_ores = 5,
clust_size = 3,
y_min = 1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_copper",
wherein = "default:stone",
clust_scarcity = 12 * 12 * 12,
clust_num_ores = 4,
clust_size = 3,
y_min = -63,
y_max = -16,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_copper",
wherein = "default:stone",
clust_scarcity = 9 * 9 * 9,
clust_num_ores = 5,
clust_size = 3,
y_min = -31000,
y_max = -64,
})
-- Gold
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_gold",
wherein = "default:stone",
clust_scarcity = 13 * 13 * 13,
clust_num_ores = 5,
clust_size = 3,
y_min = 1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_gold",
wherein = "default:stone",
clust_scarcity = 15 * 15 * 15,
clust_num_ores = 3,
clust_size = 2,
y_min = -255,
y_max = -64,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_gold",
wherein = "default:stone",
clust_scarcity = 13 * 13 * 13,
clust_num_ores = 5,
clust_size = 3,
y_min = -31000,
y_max = -256,
})
-- Mese crystal
--[[
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_mese",
wherein = "default:stone",
clust_scarcity = 14 * 14 * 14,
clust_num_ores = 5,
clust_size = 3,
y_min = 1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_mese",
wherein = "default:stone",
clust_scarcity = 18 * 18 * 18,
clust_num_ores = 3,
clust_size = 2,
y_min = -255,
y_max = -64,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_mese",
wherein = "default:stone",
clust_scarcity = 14 * 14 * 14,
clust_num_ores = 5,
clust_size = 3,
y_min = -31000,
y_max = -256,
})
]]
-- Diamond
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_diamond",
wherein = "default:stone",
clust_scarcity = 15 * 15 * 15,
clust_num_ores = 4,
clust_size = 3,
y_min = 1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_diamond",
wherein = "default:stone",
clust_scarcity = 17 * 17 * 17,
clust_num_ores = 4,
clust_size = 3,
y_min = -255,
y_max = -128,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_diamond",
wherein = "default:stone",
clust_scarcity = 15 * 15 * 15,
clust_num_ores = 4,
clust_size = 3,
y_min = -31000,
y_max = -256,
})
-- Mese block
--[[
minetest.register_ore({
ore_type = "scatter",
ore = "default:mese",
wherein = "default:stone",
clust_scarcity = 36 * 36 * 36,
clust_num_ores = 3,
clust_size = 2,
y_min = 1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:mese",
wherein = "default:stone",
clust_scarcity = 36 * 36 * 36,
clust_num_ores = 3,
clust_size = 2,
y_min = -31000,
y_max = -1024,
})
]]
--fossils
minetest.register_ore({
ore_type = "scatter",
ore = "mapgen:stone_with_ammonite",
wherein = "default:stone",
clust_scarcity = 24 * 24 * 24,
clust_num_ores = 1,
clust_size = 1,
y_min = 625,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "mapgen:stone_with_bone",
wherein = "default:stone",
clust_scarcity = 24 * 24 * 24,
clust_num_ores = 1,
clust_size = 1,
y_min = 625,
y_max = 31000,
})
minetest.clear_registered_biomes()
--Swamp
minetest.register_biome({
name = "swamp",
--node_dust = "",
node_top = "mapgen:dirt_with_swampgrass",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 3,
--node_stone = "",
node_water_top = "mapgen:dirty_water_source",
depth_water_top = 1,
--node_water = "",
--node_river_water = "",
y_min = 1,
y_max = 21000,
heat_point = 40,
humidity_point = 0,
})
-- Icesheet
minetest.register_biome({
name = "icesheet",
node_dust = "default:snowblock",
node_top = "default:snowblock",
depth_top = 1,
node_filler = "default:snowblock",
depth_filler = 3,
node_stone = "default:ice",
node_water_top = "default:ice",
depth_water_top = 10,
--node_water = "",
node_river_water = "default:ice",
node_riverbed = "default:gravel",
depth_riverbed = 2,
y_min = -8,
y_max = 31000,
heat_point = 0,
humidity_point = 73,
})
minetest.register_biome({
name = "icesheet_ocean",
node_dust = "default:snowblock",
node_top = "default:sand",
depth_top = 1,
node_filler = "default:sand",
depth_filler = 3,
--node_stone = "",
node_water_top = "default:ice",
depth_water_top = 10,
--node_water = "",
--node_river_water = "",
y_min = -112,
y_max = -9,
heat_point = 0,
humidity_point = 73,
})
-- Tundra
minetest.register_biome({
name = "tundra",
node_dust = "default:snowblock",
--node_top = ,
--depth_top = ,
--node_filler = ,
--depth_filler = ,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:gravel",
depth_riverbed = 2,
y_min = 2,
y_max = 31000,
heat_point = 0,
humidity_point = 40,
})
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 = "",
node_riverbed = "default:gravel",
depth_riverbed = 2,
y_min = -3,
y_max = 1,
heat_point = 0,
humidity_point = 40,
})
minetest.register_biome({
name = "tundra_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 = "",
node_riverbed = "default:gravel",
depth_riverbed = 2,
y_min = -112,
y_max = -4,
heat_point = 0,
humidity_point = 40,
})
-- Taiga
minetest.register_biome({
name = "taiga",
node_dust = "default:snow",
node_top = "default:dirt_with_snow",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 3,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 2,
y_max = 31000,
heat_point = 25,
humidity_point = 70,
})
minetest.register_biome({
name = "taiga_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 = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = -112,
y_max = 1,
heat_point = 25,
humidity_point = 70,
})
-- Snowy grassland
minetest.register_biome({
name = "snowy_grassland",
node_dust = "default:snow",
node_top = "default:dirt_with_snow",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 1,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 5,
y_max = 31000,
heat_point = 20,
humidity_point = 35,
})
minetest.register_biome({
name = "snowy_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 = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = -112,
y_max = 4,
heat_point = 20,
humidity_point = 35,
})
--bamboo forest
minetest.register_biome({
name = "bamboo_forest",
--node_dust = "",
node_top = "default:dirt_with_grass",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 1,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 6,
y_max = 31000,
heat_point = 50,
humidity_point = 32,
})
-- Grassland
minetest.register_biome({
name = "grassland",
--node_dust = "",
node_top = "default:dirt_with_grass",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 1,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 6,
y_max = 31000,
heat_point = 50,
humidity_point = 35,
})
minetest.register_biome({
name = "grassland_dunes",
--node_dust = "",
node_top = "default:sand",
depth_top = 1,
node_filler = "default:sand",
depth_filler = 2,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 5,
y_max = 5,
heat_point = 50,
humidity_point = 35,
})
minetest.register_biome({
name = "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 = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = -112,
y_max = 4,
heat_point = 50,
humidity_point = 35,
})
-- Coniferous forest
minetest.register_biome({
name = "coniferous_forest",
--node_dust = "",
node_top = "default:dirt_with_grass",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 3,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 6,
y_max = 31000,
heat_point = 45,
humidity_point = 70,
})
minetest.register_biome({
name = "coniferous_forest_tall",
--node_dust = "",
node_top = "mapgen:dirt_with_leafygrass",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 3,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 6,
y_max = 31000,
heat_point = 50,
humidity_point = 70,
})
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 = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 5,
y_max = 5,
heat_point = 45,
humidity_point = 70,
})
minetest.register_biome({
name = "coniferous_forest_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 = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = -112,
y_max = 4,
heat_point = 45,
humidity_point = 70,
})
-- Deciduous forest
minetest.register_biome({
name = "deciduous_forest",
--node_dust = "",
node_top = "default:dirt_with_grass",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 3,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 1,
y_max = 31000,
heat_point = 60,
humidity_point = 68,
})
minetest.register_biome({
name = "deciduous_forest2",
--node_dust = "",
node_top = "default:dirt_with_grass",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 3,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 1,
y_max = 31000,
heat_point = 62,
humidity_point = 70,
})
minetest.register_biome({
name = "deciduous_forest_shore",
--node_dust = "",
node_top = "default:dirt",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 3,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = -1,
y_max = 0,
heat_point = 60,
humidity_point = 68,
})
minetest.register_biome({
name = "deciduous_forest_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 = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = -112,
y_max = -2,
heat_point = 60,
humidity_point = 68,
})
-- Desert
minetest.register_biome({
name = "desert",
--node_dust = "",
node_top = "default:desert_sand",
depth_top = 1,
node_filler = "default:desert_sand",
depth_filler = 1,
node_stone = "default:desert_stone",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 5,
y_max = 31000,
heat_point = 92,
humidity_point = 16,
})
minetest.register_biome({
name = "desert_ocean",
--node_dust = "",
node_top = "default:sand",
depth_top = 1,
node_filler = "default:sand",
depth_filler = 3,
node_stone = "default:desert_stone",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = -112,
y_max = 4,
heat_point = 92,
humidity_point = 16,
})
-- Sandstone desert
minetest.register_biome({
name = "sandstone_desert",
--node_dust = "",
node_top = "default:sand",
depth_top = 1,
node_filler = "default:sand",
depth_filler = 0,
node_stone = "default:sandstone",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 5,
y_max = 31000,
heat_point = 60,
humidity_point = 0,
})
minetest.register_biome({
name = "sandstone_desert_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 = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = -112,
y_max = 4,
heat_point = 60,
humidity_point = 0,
})
-- Cold desert
--[[
minetest.register_biome({
name = "cold_desert",
--node_dust = "",
node_top = "default:silver_sand",
depth_top = 1,
node_filler = "default:silver_sand",
depth_filler = 1,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 5,
y_max = 31000,
heat_point = 40,
humidity_point = 0,
})
minetest.register_biome({
name = "cold_desert_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 = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = -112,
y_max = 4,
heat_point = 40,
humidity_point = 0,
})
]]
-- Savanna
minetest.register_biome({
name = "savanna",
--node_dust = "",
node_top = "default:dirt_with_dry_grass",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 1,
node_stone = "mapgen:savanna_stone",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 1,
y_max = 31000,
heat_point = 89,
humidity_point = 42,
})
minetest.register_biome({
name = "savanna_shore",
--node_dust = "",
node_top = "default:dirt",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 3,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = -1,
y_max = 0,
heat_point = 89,
humidity_point = 42,
})
minetest.register_biome({
name = "savanna_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 = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = -112,
y_max = -2,
heat_point = 89,
humidity_point = 42,
})
-- Rainforest
minetest.register_biome({
name = "rainforest",
--node_dust = "mapgen:moss",
node_top = "mapgen:dirt_with_junglegrass",
depth_top = 1,
node_filler = "mapgen:coarse_dirt",
depth_filler = 3,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
node_water = "mapgen:dirty_water_source",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 1,
y_max = 31000,
heat_point = 86,
humidity_point = 65,
})
minetest.register_biome({
name = "rainforest_swamp",
--node_dust = "",
node_top = "default:dirt",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 3,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = -1,
y_max = 0,
heat_point = 86,
humidity_point = 65,
})
minetest.register_biome({
name = "rainforest_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 = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = -112,
y_max = -2,
heat_point = 86,
humidity_point = 65,
})
-- Underground
minetest.register_biome({
name = "underground",
--node_dust = "",
--node_top = "",
--depth_top = ,
--node_filler = "",
--depth_filler = ,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
y_min = -31000,
y_max = -113,
heat_point = 50,
humidity_point = 50,
})
--
-- Register decorations
--
local function register_grass_decoration(offset, scale, length)
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass", "default:sand", "mapgen:dirt_with_leafygrass"},
sidelen = 16,
noise_params = {
offset = offset,
scale = scale,
spread = {x = 200, y = 200, z = 200},
seed = 329,
octaves = 3,
persist = 0.6
},
biomes = {"grassland", "grassland_dunes", "deciduous_forest",
"coniferous_forest", "coniferous_forest_dunes", "coniferous_forest_tall"},
y_min = 1,
y_max = 31000,
decoration = "default:grass_" .. length,
})
end
local function register_dry_grass_decoration(offset, scale, length)
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_dry_grass"},
sidelen = 16,
noise_params = {
offset = offset,
scale = scale,
spread = {x = 200, y = 200, z = 200},
seed = 329,
octaves = 3,
persist = 0.6
},
biomes = {"savanna"},
y_min = 1,
y_max = 31000,
decoration = "default:dry_grass_" .. length,
})
end
local function register_jungle_grass_decoration(offset, scale, length)
minetest.register_decoration({
deco_type = "simple",
place_on = {"mapgen:dirt_with_junglegrass", "default:dirt"},
sidelen = 16,
noise_params = {
offset = offset,
scale = scale,
spread = {x = 200, y = 200, z = 200},
seed = 329,
octaves = 3,
persist = 0.6
},
biomes = {"rainforest", "rainforest_swamp", "rainforest_ocean",},
y_min = 1,
y_max = 31000,
decoration = "mapgen:jungle_grass_" .. length,
})
end
local function register_snow_grass_decoration(offset, scale, length)
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_snow",},
sidelen = 16,
noise_params = {
offset = offset,
scale = scale,
spread = {x = 200, y = 200, z = 200},
seed = 329,
octaves = 3,
persist = 0.6
},
biomes = {"icesheet", "taiga", "snowy_grassland",},
y_min = 1,
y_max = 31000,
decoration = "mapgen:snow_grass_" .. length,
})
end
local function register_swamp_grass_decoration(offset, scale, length)
minetest.register_decoration({
deco_type = "simple",
place_on = {"mapgen:dirt_with_swampgrass", "default:dirt"},
sidelen = 16,
noise_params = {
offset = offset,
scale = scale,
spread = {x = 200, y = 200, z = 200},
seed = 329,
octaves = 3,
persist = 0.6
},
biomes = {"swamp",},
y_min = 1,
y_max = 31000,
decoration = "mapgen:swamp_grass_" .. length,
})
end
minetest.clear_registered_decorations()
--bamboo
minetest.register_decoration({
deco_type = "simple",
place_on = "default:dirt_with_grass",
sidelen = 16,
noise_params = {
offset = 0.005,
scale = 0.01,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
fill_ratio = 0.05,
biomes = {"bamboo_forest",},
decoration = "mapgen:bamboo_small",
height = 3,
})
minetest.register_decoration({
deco_type = "simple",
place_on = "default:dirt_with_grass", "mapgen:dirt_with_leafygrass",
sidelen = 16,
noise_params = {
offset = 0.005,
scale = 0.01,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"bamboo_forest",},
decoration = "mapgen:bamboo_grass",
height = 1,
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = 0.016,
scale = 0.022,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"bamboo_forest",},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/bamboo1.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.016,
scale = 0.022,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"bamboo_forest",},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/bamboo2.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.016,
scale = 0.012,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"bamboo_forest",},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/bamboo5.mts",
flags = "place_center_x, place_center_z",
})
--stone
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = 0.0005,
scale = 0.0005,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"coniferous_forest_tall"},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/rocks/savanna_rock1.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.0005,
scale = 0.0005,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"coniferous_forest_tall"},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/rocks/savanna_rock2.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.0005,
scale = 0.0005,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"coniferous_forest_tall"},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/rocks/savanna_rock3.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.0005,
scale = 0.0005,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"deciduous_forest2", "grassland"},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/rocks/rock1.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.0005,
scale = 0.0005,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"deciduous_forest2", "grassland"},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/rocks/rock2.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.0005,
scale = 0.0005,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"deciduous_forest2", "grassland"},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/rocks/rock3.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:desert_sand"},
sidelen = 16,
noise_params = {
offset = 0.0005,
scale = 0.0005,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"desert",},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/rocks/desert_rock1.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:desert_sand"},
sidelen = 16,
noise_params = {
offset = 0.0005,
scale = 0.0005,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"desert",},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/rocks/desert_rock2.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:desert_sand"},
sidelen = 16,
noise_params = {
offset = 0.0005,
scale = 0.0005,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"desert",},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/rocks/desert_rock3.mts",
flags = "place_center_x, place_center_z",
})
--deciduous_forest trees
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = 0.016,
scale = 0.012,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"deciduous_forest2"},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/deciduous_tree1.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.016,
scale = 0.012,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"deciduous_forest2"},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/deciduous_tree2.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.016,
scale = 0.012,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"deciduous_forest2"},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/deciduous_tree3.mts",
flags = "place_center_x, place_center_z",
})
-- Apple tree and log
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = 0.015,
scale = 0.005,
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("mapgen") .. "/schematics/oak.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.025,
scale = 0.010,
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("mapgen") .. "/schematics/oak_s.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.026,
scale = 0.012,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"deciduous_forest2"},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("default") .. "/schematics/apple_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.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 = {"mapgen:dirt_with_junglegrass", "default:dirt"},
sidelen = 80,
fill_ratio = 0.03,
biomes = {"rainforest",},
y_min = -1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/jungletree.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"mapgen:dirt_with_junglegrass", "default:dirt"},
sidelen = 80,
fill_ratio = 0.03,
biomes = {"rainforest_swamp"},
y_min = -1,
y_max = 31000,
schematic = minetest.get_modpath("default") .. "/schematics/jungle_tree.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"mapgen:dirt_with_junglegrass", "default:dirt"},
sidelen = 80,
fill_ratio = 0.03,
biomes = {"rainforest",},
y_min = -1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/junglepalm.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"mapgen:dirt_with_junglegrass", "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:dirt_with_snow", "default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = 0.036,
scale = 0.022,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"taiga", "coniferous_forest"},
y_min = 2,
y_max = 31000,
schematic = minetest.get_modpath("default") .. "/schematics/pine_tree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"mapgen:dirt_with_leafygrass"},
sidelen = 16,
noise_params = {
offset = 0.006,
scale = 0.002,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"coniferous_forest_tall"},
y_min = 2,
y_max = 31000,
schematic = minetest.get_modpath("default") .. "/schematics/pine_tree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"mapgen:dirt_with_leafygrass", "mapgen:coarse_dirt"},
sidelen = 16,
noise_params = {
offset = 0.036,
scale = 0.022,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"coniferous_forest_tall"},
y_min = -50,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/pine.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt_with_snow", "default:dirt_with_grass", "mapgen:dirt_with_leafygrass"},
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", "coniferous_forest_tall"},
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",
})
--yellow ipe
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.002,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"deciduous_forest2"},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/ipe.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
--baobab tree
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt_with_dry_grass"},
sidelen = 16,
noise_params = {
offset = -0.05,
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 = minetest.get_modpath("mapgen") .. "/schematics/baobab.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt_with_dry_grass"},
sidelen = 16,
noise_params = {
offset = -0.001,
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 = minetest.get_modpath("mapgen") .. "/schematics/baobab1.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt_with_dry_grass"},
sidelen = 16,
noise_params = {
offset = -0.001,
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 = minetest.get_modpath("mapgen") .. "/schematics/baobab2.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
--oats
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_dry_grass"},
sidelen = 6,
fill_ratio = 0.01,
biomes = {"savanna"},
decoration = "mapgen:wild_oat_dry",
height = 1,
})
--dead grass
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_dry_grass"},
sidelen = 6,
fill_ratio = 0.002,
biomes = {"savanna"},
decoration = "mapgen:dead_grass_1",
height = 1,
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_dry_grass"},
sidelen = 6,
fill_ratio = 0.002,
biomes = {"savanna"},
decoration = "mapgen:dead_grass_2",
height = 1,
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_dry_grass", "default:desert_sand"},
sidelen = 6,
fill_ratio = 0.002,
biomes = {"savanna", "desert"},
decoration = "mapgen:dead_grass_3",
height = 1,
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_dry_grass", "default:desert_sand"},
sidelen = 6,
fill_ratio = 0.002,
biomes = {"savanna", "desert"},
decoration = "mapgen:dead_grass_4",
height = 1,
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_dry_grass", "default:desert_sand"},
sidelen = 6,
fill_ratio = 0.002,
biomes = {"savanna", "desert"},
decoration = "mapgen:dead_grass_5",
height = 1,
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass"},
sidelen = 6,
fill_ratio = 0.01,
biomes = {"grassland", "deciduous_forest", "deciduous_forest2"},
decoration = "mapgen:wild_oat",
height = 1,
})
-- Acacia tree and log
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt_with_dry_grass"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.002,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"savanna"},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("default") .. "/schematics/acacia_tree.mts",
flags = "place_center_x, place_center_z",
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",
})
--Willow tree
--[[
minetest.register_decoration({
deco_type = "schematic",
place_on = {"mapgen:dirt_with_swampgrass"},
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 = {"swamp"},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/willow.mts",
flags = "place_center_x, place_center_z",
})
]]
minetest.register_decoration({
deco_type = "schematic",
place_on = {"mapgen:dirt_with_swampgrass"},
sidelen = 16,
noise_params = {
offset = 0.01,
scale = 0.001,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"swamp"},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen") .. "/schematics/willow2.mts",
flags = "place_center_x, place_center_z",
})
-- 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 = 16,
noise_params = {
offset = -0.0003,
scale = 0.0009,
spread = {x = 200, y = 200, z = 200},
seed = 230,
octaves = 3,
persist = 0.6
},
biomes = {"desert"},
y_min = 5,
y_max = 31000,
schematic = minetest.get_modpath("default") .. "/schematics/large_cactus.mts",
flags = "place_center_x",
rotation = "random",
})]]
-- Cactus
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:desert_sand"},
sidelen = 16,
noise_params = {
offset = -0.0003,
scale = 0.0009,
spread = {x = 200, y = 200, z = 200},
seed = 230,
octaves = 3,
persist = 0.6
},
biomes = {"desert"},
y_min = 5,
y_max = 31000,
decoration = "default:cactus",
height = 2,
height_max = 5,
})
-- Papyrus
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt"},
sidelen = 16,
noise_params = {
offset = -0.3,
scale = 0.7,
spread = {x = 200, y = 200, z = 200},
seed = 354,
octaves = 3,
persist = 0.7
},
biomes = {"savanna_shore"},
y_min = 0,
y_max = 0,
schematic = minetest.get_modpath("default") .. "/schematics/papyrus.mts",
})
--tall grass
minetest.register_decoration({
deco_type = "simple",
place_on = "default:dirt_with_grass", "mapgen:dirt_with_leafygrass", "mapgen:dirt_with_swampgrass",
sidelen = 16,
fill_ratio = 0.01,
biomes = {"grassland", "deciduous_forest", "coniferous_forest_tall", "swamp"},
decoration = "mapgen:tallgrass",
height = 1,
})
--giant grass
minetest.register_decoration({
deco_type = "simple",
place_on = "mapgen:dirt_with_swampgrass",
sidelen = 16,
fill_ratio = 0.1,
biomes = {"swamp",},
decoration = "mapgen:giantgrass",
height = 1,
})
--pineapple
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_junglegrass", "default:dirt_with_grass"},
sidelen = 16,
fill_ratio = 0.01,
biomes = {"rainforest", "sandstone_desert"},
decoration = "mapgen:pineapple_plant",
height = 1,
})
--shrubs
minetest.register_decoration({
deco_type = "simple",
place_on = "mapgen:dirt_with_leafygrass",
sidelen = 16,
fill_ratio = 0.05,
biomes = {"coniferous_forest_tall",},
decoration = "mapgen:shrub",
height = 1,
})
--deciduous_forest2 stuff
minetest.register_decoration({
deco_type = "simple",
place_on = "default:dirt_with_grass",
sidelen = 16,
fill_ratio = 0.05,
biomes = {"deciduous_forest2",},
decoration = "mapgen:creeper",
height = 1,
})
minetest.register_decoration({
deco_type = "simple",
place_on = "default:dirt_with_grass",
sidelen = 16,
fill_ratio = 0.05,
biomes = {"deciduous_forest2",},
decoration = "mapgen:shrub2",
height = 1,
})
minetest.register_decoration({
deco_type = "simple",
place_on = "default:dirt_with_grass",
sidelen = 16,
fill_ratio = 0.05,
biomes = {"deciduous_forest2",},
decoration = "mapgen:bush",
height = 1,
})
--ferns
minetest.register_decoration({
deco_type = "simple",
place_on = "mapgen:dirt_with_leafygrass",
sidelen = 16,
fill_ratio = 0.02,
biomes = {"coniferous_forest_tall",},
decoration = "mapgen:fern",
height = 1,
})
minetest.register_decoration({
deco_type = "simple",
place_on = "mapgen:dirt_with_junglegrass",
sidelen = 16,
fill_ratio = 0.02,
biomes = {"rainforest",},
decoration = "mapgen:fern",
height = 1,
})
minetest.register_decoration({
deco_type = "simple",
place_on = "mapgen:dirt_with_junglegrass",
sidelen = 16,
fill_ratio = 0.02,
biomes = {"rainforest",},
decoration = "mapgen:fern2",
height = 1,
})
minetest.register_decoration({
deco_type = "simple",
place_on = "mapgen:dirt_with_junglegrass",
sidelen = 16,
fill_ratio = 0.01,
biomes = {"rainforest",},
decoration = "mapgen:dicksonia",
height = 1,
})
minetest.register_decoration({
deco_type = "simple",
place_on = "mapgen:dirt_with_junglegrass",
sidelen = 16,
fill_ratio = 0.02,
biomes = {"rainforest",},
decoration = "mapgen:bananaplant",
height = 1,
})
minetest.register_decoration({
deco_type = "simple",
place_on = "mapgen:dirt_with_junglegrass",
sidelen = 16,
fill_ratio = 0.02,
biomes = {"rainforest",},
decoration = "mapgen:jungletree",
height = 1,
})
minetest.register_decoration({
deco_type = "simple",
place_on = "mapgen:dirt_with_junglegrass",
sidelen = 16,
fill_ratio = 0.05,
biomes = {"rainforest",},
decoration = "mapgen:moss",
height = 1,
})
-- Bush
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt_with_grass", "default:dirt_with_snow"},
sidelen = 16,
noise_params = {
offset = -0.004,
scale = 0.01,
spread = {x = 100, y = 100, z = 100},
seed = 137,
octaves = 3,
persist = 0.7,
},
biomes = {"snowy_grassland", "grassland", "deciduous_forest", "bamboo_forest", "coniferous_forest_tall"},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("default") .. "/schematics/bush.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.01,
scale = 0.015,
spread = {x = 100, y = 100, z = 100},
seed = 137,
octaves = 3,
persist = 0.7,
},
biomes = {"bamboo_forest",},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("default") .. "/schematics/bush.mts",
flags = "place_center_x, place_center_z",
})
-- Acacia bush
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt_with_dry_grass"},
sidelen = 16,
noise_params = {
offset = -0.004,
scale = 0.01,
spread = {x = 100, y = 100, z = 100},
seed = 90155,
octaves = 3,
persist = 0.7,
},
biomes = {"savanna"},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("default") .. "/schematics/acacia_bush.mts",
flags = "place_center_x, place_center_z",
})
-- Grasses
register_grass_decoration(-0.03, 0.09, 5)
register_grass_decoration(-0.015, 0.075, 4)
register_grass_decoration(0, 0.06, 3)
register_grass_decoration(0.015, 0.045, 2)
register_grass_decoration(0.03, 0.03, 1)
--Jungle grasses
register_jungle_grass_decoration(-0.03, 0.09, 5)
register_jungle_grass_decoration(-0.015, 0.075, 4)
register_jungle_grass_decoration(0, 0.06, 3)
register_jungle_grass_decoration(0.015, 0.045, 2)
register_jungle_grass_decoration(0.03, 0.03, 1)
--Snow grasses
register_snow_grass_decoration(-0.03, 0.09, 5)
register_snow_grass_decoration(-0.015, 0.075, 4)
register_snow_grass_decoration(0, 0.06, 3)
register_snow_grass_decoration(0.015, 0.045, 2)
register_snow_grass_decoration(0.03, 0.03, 1)
--Swamp grasses
register_swamp_grass_decoration(-0.03, 0.09, 5)
register_swamp_grass_decoration(-0.015, 0.075, 4)
register_swamp_grass_decoration(0, 0.06, 3)
register_swamp_grass_decoration(0.015, 0.045, 2)
register_swamp_grass_decoration(0.03, 0.03, 1)
-- Dry grasses
register_dry_grass_decoration(0.01, 0.05, 5)
register_dry_grass_decoration(0.03, 0.03, 4)
register_dry_grass_decoration(0.05, 0.01, 3)
register_dry_grass_decoration(0.07, -0.01, 2)
register_dry_grass_decoration(0.09, -0.03, 1)
-- Junglegrass
minetest.register_decoration({
deco_type = "simple",
place_on = {"mapgen:dirt_with_junglegrass"},
sidelen = 80,
fill_ratio = 0.1,
biomes = {"rainforest"},
y_min = 1,
y_max = 31000,
decoration = "default:junglegrass",
})
--Aloe Vera
minetest.register_decoration({
deco_type = "simple",
place_on = "default:desert_sand",
sidelen = 16,
fill_ratio = 0.02,
biomes = {"swamp",},
decoration = "mapgen:aloe_vera",
height = 1,
})
-- Dry shrub
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:desert_sand",
"default:sand", "default:silver_sand"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.02,
spread = {x = 200, y = 200, z = 200},
seed = 329,
octaves = 3,
persist = 0.6
},
biomes = {"desert", "sandstone_desert", "cold_desert"},
y_min = 2,
y_max = 31000,
decoration = "default:dry_shrub",
})
--small cacti
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:desert_sand",
"default:sand",},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.02,
spread = {x = 200, y = 200, z = 200},
seed = 329,
octaves = 3,
persist = 0.6
},
biomes = {"desert", "sandstone_desert",},
y_min = 2,
y_max = 31000,
decoration = "mapgen:small_cactus",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:desert_sand",
"default:sand",},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.02,
spread = {x = 200, y = 200, z = 200},
seed = 329,
octaves = 3,
persist = 0.6
},
biomes = {"desert", "sandstone_desert",},
y_min = 2,
y_max = 31000,
decoration = "mapgen:small_cactus1",
})
-- Coral reef
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:sand"},
noise_params = {
offset = -0.1,
scale = 0.1,
spread = {x = 200, y = 200, z = 200},
seed = 7013,
octaves = 3,
persist = 1,
},
biomes = {
"desert_ocean",
"savanna_ocean",
"rainforest_ocean",
},
y_min = -8,
y_max = -2,
schematic = minetest.get_modpath("default") .. "/schematics/corals.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:sand",},
sidelen = 16,
noise_params = {
offset = 0.002,
scale = 0.001,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen").."/schematics/palmtree.mts",
replacements = {["mapgen:palm_leaves_coconut"] = "mapgen:palm_leaves"},
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"mapgen:dirt_with_junglegrass", "default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = 0.002,
scale = 0.001,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"rainforest"},
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("mapgen").."/schematics/palmtree.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_on_generated(function(minp, maxp)
if maxp.y < -20 or maxp.y > 1000 then
return
end
local dirt = minetest.find_nodes_in_area(minp, maxp,
{"mapgen:dirty_water_source"})
for n = 1, #dirt do
local pos = {x = dirt[n].x, y = dirt[n].y, z = dirt[n].z }
local name = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name
if name == "mapgen:lavender_flower" or name == "mapgen:swamp_grass_1" or name == "mapgen:giantgrass" or name == "mapgen:swamp_grass_2" or name == "mapgen:swamp_grass_3" or name == "mapgen:swamp_grass_4" or name == "mapgen:swamp_grass_5" then
minetest.env:remove_node({x=pos.x, y=pos.y+1, z=pos.z})
end
end
end)
if seaplants then
minetest.register_on_generated(function(minp, maxp)
if maxp.y < -100 or maxp.y > 100 then
return
end
local dirt = minetest.find_nodes_in_area(minp, maxp,
{"default:sand"})
for n = 1, #dirt do
if math.random(1, 50) == 1 then
local pos = {x = dirt[n].x, y = dirt[n].y, z = dirt[n].z }
if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == "default:water_source" and minetest.get_node({x=pos.x, y=pos.y+3, z=pos.z}).name ~= "air" then
if math.random(1,4) == 1 then
minetest.add_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "mapgen:red_coral"})
elseif math.random(1,4) == 1 then
minetest.add_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "mapgen:big_coral"})
elseif math.random(1,3) == 1 then
minetest.add_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "mapgen:anemone"})
elseif math.random(1,3) == 1 then
minetest.add_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "mapgen:blue_coral"})
else
minetest.add_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "mapgen:orange_coral"})
end
end
end
if math.random(1, 20) == 1 then
local pos = {x = dirt[n].x, y = dirt[n].y, z = dirt[n].z }
local num = math.random(1,2)
if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == "default:water_source" and minetest.get_node({x=pos.x, y=pos.y+3, z=pos.z}).name ~= "air" then
if math.random(1,1) == 1 then
minetest.add_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "mapgen:kelp"..num})
if math.random(1,2) == 1 and minetest.get_node({x=pos.x, y=pos.y+4, z=pos.z}).name ~= "air" then
minetest.add_node({x=pos.x, y=pos.y+2, z=pos.z}, {name = "mapgen:kelp"..num})
if math.random(1,2) == 1 and minetest.get_node({x=pos.x, y=pos.y+5, z=pos.z}).name ~= "air" then
minetest.add_node({x=pos.x, y=pos.y+3, z=pos.z}, {name = "mapgen:kelp"..num})
if math.random(1,2) == 1 and minetest.get_node({x=pos.x, y=pos.y+6, z=pos.z}).name ~= "air" then
minetest.add_node({x=pos.x, y=pos.y+4, z=pos.z}, {name = "mapgen:kelp"..num})
if math.random(1,2) == 1 and minetest.get_node({x=pos.x, y=pos.y+7, z=pos.z}).name ~= "air" then
minetest.add_node({x=pos.x, y=pos.y+5, z=pos.z}, {name = "mapgen:kelp"..num})
end
end
end
end
end
end
end
end
end)
end
minetest.register_on_generated(function(minp, maxp)
if maxp.y < -1000 or maxp.y > 10 then
return
end
local dirt = minetest.find_nodes_in_area(minp, maxp,
{"default:stone"})
for n = 1, #dirt do
if math.random(1, 50) == 1 then
local pos = {x = dirt[n].x, y = dirt[n].y, z = dirt[n].z }
if minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "air" then
if math.random(1,2) == 1 then
minetest.add_node({x=pos.x, y=pos.y-1, z=pos.z}, {name = "mapgen:stalagtite"})
elseif math.random(1,2) == 1 then
minetest.add_node({x=pos.x, y=pos.y-1, z=pos.z}, {name = "mapgen:stalagtite1"})
elseif math.random(1,2) == 1 then
minetest.add_node({x=pos.x, y=pos.y-1, z=pos.z}, {name = "mapgen:stalagtite2"})
else
minetest.add_node({x=pos.x, y=pos.y-1, z=pos.z}, {name = "mapgen:stalagtite3"})
end
end
end
end
end)
minetest.register_on_generated(function(minp, maxp)
if maxp.y < -500 or maxp.y > 100 then
return
end
local dirt = minetest.find_nodes_in_area(minp, maxp,
{"default:stone"})
for n = 1, #dirt do
if math.random(1, 50) == 1 then
local pos = {x = dirt[n].x, y = dirt[n].y, z = dirt[n].z }
if minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "air" then
local num = math.random(1,2)
minetest.add_node({x=pos.x, y=pos.y-1, z=pos.z}, {name = "mapgen:cavefern"..num})
end
end
end
end)
minetest.register_on_generated(function(minp, maxp)
if maxp.y < -1000 or maxp.y > 20 then
return
end
local dirt = minetest.find_nodes_in_area(minp, maxp,
{"default:stone"})
for n = 1, #dirt do
if math.random(1, 50) == 1 then
local pos = {x = dirt[n].x, y = dirt[n].y, z = dirt[n].z }
if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == "air" and pos.y >= -100 then
if math.random(1,2) == 1 then
minetest.add_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "mapgen:stalagmite0"})
elseif math.random(1,2) == 1 then
minetest.add_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "mapgen:stalagmite1"})
else
minetest.add_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "mapgen:stalagmite2"})
end
end
end
end
end)
minetest.register_on_generated(function(minp, maxp)
if maxp.y < -2000 or maxp.y > 1500 then
return
end
local stone = minetest.find_nodes_in_area(minp, maxp,
{"default:stone"})
for n = 1, #stone do
if math.random(1, 150) == 1 then
local pos = {x = stone[n].x, y = stone[n].y, z = stone[n].z }
if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == "air" then
if math.random(1,5) == 1 then
minetest.add_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "mapgen:crystal_small"})
else
minetest.add_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "mapgen:crystal"})
end
end
end
end
end)
--underground dungeons
local dungeon_rarity = 1000
minetest.register_on_generated(function(minp, maxp)
if maxp.y > -60 or maxp.y < -30000 then
return
end
local stone = minetest.find_nodes_in_area(minp, maxp,
{"default:stone_with_diamond"})
for n = 1, #stone do
if math.random(1, dungeon_rarity) == 1 then
local pos = {x = stone[n].x, y = stone[n].y, z = stone[n].z }
local number = math.random(1,4)
if math.random(1,10) == 1 then
minetest.place_schematic(pos, minetest.get_modpath("mapgen").."/schematics/dungeon"..number..".mts", random, {["decoblocks:chest"] = "mobs_m:mimic_chest2", ["mobs_m:mimic_chest2"] = "decoblocks:chest",}, true)
else
minetest.place_schematic(pos, minetest.get_modpath("mapgen").."/schematics/dungeon"..number..".mts", random, {}, true)
end
end
end
end)
--fruit
if minetest.get_modpath("fruit") then
fruit.register_ores()
end
if minetest.get_modpath("flowers_plus") then
flowers_plus_decorations()
end
if minetest.get_mapgen_params().mgname == "v6" then
farming.register_mgv6_decorations()
flowers.register_mgv6_decorations()
else
farming.register_mgv7_decorations()
flowers.register_decorations()
end