mirror of
https://github.com/minetest/minetest.git
synced 2024-11-30 19:43:45 +01:00
0b187ede4b
Treegen: Remove alias checks from jungletree generation for speed
144 lines
3.6 KiB
Lua
144 lines
3.6 KiB
Lua
--
|
|
-- Aliases for map generator outputs
|
|
--
|
|
|
|
|
|
minetest.register_alias("mapgen_stone", "default:stone")
|
|
minetest.register_alias("mapgen_dirt", "default:dirt")
|
|
minetest.register_alias("mapgen_dirt_with_grass", "default:dirt_with_grass")
|
|
minetest.register_alias("mapgen_sand", "default:sand")
|
|
minetest.register_alias("mapgen_water_source", "default:water_source")
|
|
minetest.register_alias("mapgen_lava_source", "default:lava_source")
|
|
minetest.register_alias("mapgen_gravel", "default:gravel")
|
|
minetest.register_alias("mapgen_dirt_with_snow", "default:dirt_with_snow")
|
|
minetest.register_alias("mapgen_snowblock", "default:snowblock")
|
|
minetest.register_alias("mapgen_snow", "default:snow")
|
|
minetest.register_alias("mapgen_ice", "default:ice")
|
|
|
|
minetest.register_alias("mapgen_tree", "default:tree")
|
|
minetest.register_alias("mapgen_leaves", "default:leaves")
|
|
minetest.register_alias("mapgen_apple", "default:apple")
|
|
minetest.register_alias("mapgen_jungletree", "default:jungletree")
|
|
minetest.register_alias("mapgen_jungleleaves", "default:jungleleaves")
|
|
minetest.register_alias("mapgen_junglegrass", "default:junglegrass")
|
|
minetest.register_alias("mapgen_pinetree", "default:pinetree")
|
|
minetest.register_alias("mapgen_pine_needles", "default:pine_needles")
|
|
|
|
minetest.register_alias("mapgen_cobble", "default:cobble")
|
|
minetest.register_alias("mapgen_stair_cobble", "stairs:stair_cobble")
|
|
minetest.register_alias("mapgen_mossycobble", "default:mossycobble")
|
|
|
|
|
|
--
|
|
-- Ore generation
|
|
--
|
|
|
|
|
|
-- Blob ore first to avoid other ores inside blobs
|
|
|
|
minetest.register_ore({
|
|
ore_type = "blob",
|
|
ore = "default:clay",
|
|
wherein = {"default:sand"},
|
|
clust_scarcity = 24*24*24,
|
|
clust_size = 7,
|
|
y_min = -15,
|
|
y_max = 0,
|
|
noise_threshhold = 0,
|
|
noise_params = {
|
|
offset=0.35,
|
|
scale=0.2,
|
|
spread={x=5, y=5, z=5},
|
|
seed=-316,
|
|
octaves=1,
|
|
persist=0.5
|
|
},
|
|
})
|
|
|
|
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_iron",
|
|
wherein = "default:stone",
|
|
clust_scarcity = 12*12*12,
|
|
clust_num_ores = 3,
|
|
clust_size = 2,
|
|
y_min = -15,
|
|
y_max = 2,
|
|
})
|
|
|
|
minetest.register_ore({
|
|
ore_type = "scatter",
|
|
ore = "default:stone_with_iron",
|
|
wherein = "default:stone",
|
|
clust_scarcity = 9*9*9,
|
|
clust_num_ores = 5,
|
|
clust_size = 3,
|
|
y_min = -63,
|
|
y_max = -16,
|
|
})
|
|
|
|
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 = -64,
|
|
})
|
|
|
|
|
|
--
|
|
-- Register biomes for biome API
|
|
--
|
|
|
|
|
|
minetest.clear_registered_biomes()
|
|
|
|
minetest.register_biome({
|
|
name = "default: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 = "",
|
|
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 = 4,
|
|
heat_point = 50,
|
|
humidity_point = 50,
|
|
})
|
|
|