minetest.register_alias("mapgen_stair_cobble", "stairs:stair_cobble")
--
--- Ore generation
+-- Register ores
--
function default.register_ores()
wherein = {"default:sand"},
clust_scarcity = 24*24*24,
clust_size = 7,
- y_min = -10,
+ y_min = -15,
y_max = 0,
noise_threshhold = 0,
noise_params = {
persist=0.5
},
})
+
+ minetest.register_ore({
+ ore_type = "blob",
+ ore = "default:sand",
+ wherein = {"default:stone"},
+ clust_scarcity = 24*24*24,
+ clust_size = 7,
+ y_min = -63,
+ y_max = 4,
+ noise_threshhold = 0,
+ noise_params = {
+ offset=0.35,
+ scale=0.2,
+ spread={x=5, y=5, z=5},
+ seed=2316,
+ octaves=1,
+ persist=0.5
+ },
+ })
+
+ minetest.register_ore({
+ ore_type = "blob",
+ ore = "default:dirt",
+ wherein = {"default:stone"},
+ clust_scarcity = 24*24*24,
+ clust_size = 7,
+ y_min = -63,
+ y_max = 31000,
+ noise_threshhold = 0,
+ noise_params = {
+ offset=0.35,
+ scale=0.2,
+ spread={x=5, y=5, z=5},
+ seed=17676,
+ octaves=1,
+ persist=0.5
+ },
+ })
+
+ minetest.register_ore({
+ ore_type = "blob",
+ ore = "default:gravel",
+ wherein = {"default:stone"},
+ clust_scarcity = 24*24*24,
+ clust_size = 7,
+ y_min = -31000,
+ y_max = 31000,
+ noise_threshhold = 0,
+ noise_params = {
+ offset=0.35,
+ scale=0.2,
+ spread={x=5, y=5, z=5},
+ seed=766,
+ octaves=1,
+ persist=0.5
+ },
+ })
end
-function default.generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max)
+function default.generate_ore(name, wherein, minp, maxp, seed,
+ chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max)
minetest.log('action', "WARNING: default.generate_ore is deprecated")
if maxp.y < height_min or minp.y > height_max then
--
function default.mgv6_ongen(minp, maxp, seed)
-
function default.make_papyrus(pos, size)
for y=0,size-1 do
local p = {x=pos.x, y=pos.y+y, z=pos.z}
end
end
end
-
end
--
minetest.clear_registered_biomes()
minetest.register_biome({
- name = "grassland",
+ name = "default:grassland",
+ --node_dust = "",
node_top = "default:dirt_with_grass",
- node_shore_top = "default:sand",
depth_top = 1,
node_filler = "default:dirt",
- node_shore_filler = "default:sand",
- depth_filler = 2,
- height_shore = 3,
- node_underwater = "default:sand",
+ depth_filler = 1,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
+ y_min = 5,
+ y_max = 31000,
+ heat_point = 50,
+ humidity_point = 50,
+ })
+
+ minetest.register_biome({
+ name = "default:grassland_ocean",
--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 = "",
y_min = -31000,
- y_max = 31000,
+ y_max = 4,
heat_point = 50,
humidity_point = 50,
})
+end
+
+--
+-- Register decorations
+--
- --
- -- Register decorations
- --
+function default.register_decorations()
-- Flowers
noise_params = {
offset = -0.02,
scale = 0.03,
- spread = {x=100, y=100, z=100},
+ spread = {x=200, y=200, z=200},
seed = 436,
octaves = 3,
persist = 0.6
},
- biomes = {"grassland"},
+ biomes = {"default:grassland"},
y_min = -31000,
y_max = 31000,
decoration = "flowers:rose",
})
-
+
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass"},
noise_params = {
offset = -0.02,
scale = 0.03,
- spread = {x=100, y=100, z=100},
+ spread = {x=200, y=200, z=200},
seed = 19822,
octaves = 3,
persist = 0.6
},
- biomes = {"grassland"},
- y_min = -31000,
+ biomes = {"default:grassland"},
+ y_min = 33,
y_max = 31000,
decoration = "flowers:tulip",
})
-
+
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass"},
noise_params = {
offset = -0.02,
scale = 0.03,
- spread = {x=100, y=100, z=100},
+ spread = {x=200, y=200, z=200},
seed = 1220999,
octaves = 3,
persist = 0.6
},
- biomes = {"grassland"},
+ biomes = {"default:grassland"},
y_min = -31000,
y_max = 31000,
decoration = "flowers:dandelion_yellow",
})
-
+
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass"},
noise_params = {
offset = -0.02,
scale = 0.03,
- spread = {x=100, y=100, z=100},
+ spread = {x=200, y=200, z=200},
seed = 36662,
octaves = 3,
persist = 0.6
},
- biomes = {"grassland"},
+ biomes = {"default:grassland"},
y_min = -31000,
y_max = 31000,
decoration = "flowers:geranium",
})
-
+
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass"},
noise_params = {
offset = -0.02,
scale = 0.03,
- spread = {x=100, y=100, z=100},
+ spread = {x=200, y=200, z=200},
seed = 1133,
octaves = 3,
persist = 0.6
},
- biomes = {"grassland"},
+ biomes = {"default:grassland"},
y_min = -31000,
y_max = 31000,
decoration = "flowers:viola",
})
-
+
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass"},
noise_params = {
offset = -0.02,
scale = 0.03,
- spread = {x=100, y=100, z=100},
+ spread = {x=200, y=200, z=200},
seed = 73133,
octaves = 3,
persist = 0.6
},
- biomes = {"grassland"},
+ biomes = {"default:grassland"},
y_min = -31000,
y_max = 31000,
decoration = "flowers:dandelion_white",
sidelen = 16,
noise_params = {
offset = 0.04,
- scale = 0.08,
- spread = {x=100, y=100, z=100},
+ scale = 0.04,
+ spread = {x=200, y=200, z=200},
seed = 66440,
octaves = 3,
persist = 0.6
},
- biomes = {"grassland"},
+ biomes = {"default:grassland"},
y_min = -31000,
y_max = 31000,
decoration = "default:grass_1",
})
-
+
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = 0.02,
- scale = 0.08,
- spread = {x=100, y=100, z=100},
+ scale = 0.06,
+ spread = {x=200, y=200, z=200},
seed = 66440,
octaves = 3,
persist = 0.6
},
- biomes = {"grassland"},
+ biomes = {"default:grassland"},
y_min = -31000,
y_max = 31000,
decoration = "default:grass_2",
})
-
+
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass"},
noise_params = {
offset = 0,
scale = 0.08,
- spread = {x=100, y=100, z=100},
+ spread = {x=200, y=200, z=200},
seed = 66440,
octaves = 3,
persist = 0.6
},
- biomes = {"grassland"},
+ biomes = {"default:grassland"},
y_min = -31000,
y_max = 31000,
decoration = "default:grass_3",
})
-
+
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = -0.02,
- scale = 0.08,
- spread = {x=100, y=100, z=100},
+ scale = 0.10,
+ spread = {x=200, y=200, z=200},
seed = 66440,
octaves = 3,
persist = 0.6
},
- biomes = {"grassland"},
+ biomes = {"default:grassland"},
y_min = -31000,
y_max = 31000,
decoration = "default:grass_4",
})
-
+
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = -0.04,
- scale = 0.08,
- spread = {x=100, y=100, z=100},
+ scale = 0.12,
+ spread = {x=200, y=200, z=200},
seed = 66440,
octaves = 3,
persist = 0.6
},
- biomes = {"grassland"},
+ biomes = {"default:grassland"},
y_min = -31000,
y_max = 31000,
decoration = "default:grass_5",
end
--
--- Register blob ore
---
-
-function default.register_blobs()
- minetest.register_ore({
- ore_type = "blob",
- ore = "default:sand",
- wherein = {"default:stone"},
- clust_scarcity = 24*24*24,
- clust_size = 7,
- y_min = -63,
- y_max = 4,
- noise_threshhold = 0,
- noise_params = {
- offset=0.35,
- scale=0.2,
- spread={x=5, y=5, z=5},
- seed=2316,
- octaves=1,
- persist=0.5
- },
- })
-
- minetest.register_ore({
- ore_type = "blob",
- ore = "default:dirt",
- wherein = {"default:stone"},
- clust_scarcity = 24*24*24,
- clust_size = 7,
- y_min = -63,
- y_max = 31000,
- noise_threshhold = 0,
- noise_params = {
- offset=0.35,
- scale=0.2,
- spread={x=5, y=5, z=5},
- seed=17676,
- octaves=1,
- persist=0.5
- },
- })
-
- minetest.register_ore({
- ore_type = "blob",
- ore = "default:gravel",
- wherein = {"default:stone"},
- clust_scarcity = 24*24*24,
- clust_size = 7,
- y_min = -31000,
- y_max = 31000,
- noise_threshhold = 0,
- noise_params = {
- offset=0.35,
- scale=0.2,
- spread={x=5, y=5, z=5},
- seed=766,
- octaves=1,
- persist=0.5
- },
- })
-end
-
---
--- Detect mapgen and select suitable biome code
+-- Detect mapgen to select functions
--
local mg_params = minetest.get_mapgen_params()
if mg_params.mgname == "v5" then
default.register_biomes()
- default.register_blobs()
+ default.register_decorations()
default.register_ores()
elseif mg_params.mgname == "v6" then
minetest.register_on_generated(default.mgv6_ongen)
default.register_ores()
elseif mg_params.mgname == "v7" then
default.register_biomes()
- default.register_blobs()
+ default.register_decorations()
default.register_ores()
end