forked from LizzyFleckenstein03/Memeclone
2945 lines
78 KiB
Lua
2945 lines
78 KiB
Lua
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||
|
||
--
|
||
-- Register biomes
|
||
--
|
||
|
||
local function register_classic_superflat_biome()
|
||
-- Classic Superflat: bedrock (not part of biome), 2 dirt, 1 grass block
|
||
minetest.register_biome({
|
||
name = "flat",
|
||
node_top = "mcl_core:dirt_with_grass",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_stone = "mcl_core:dirt",
|
||
y_min = mcl_vars.mg_overworld_min - 512,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 50,
|
||
humidity_point = 50,
|
||
})
|
||
end
|
||
|
||
-- All mapgens except mgv6, flat and singlenode
|
||
local function register_biomes()
|
||
--[[ OVERWORLD ]]
|
||
|
||
--[[ These biomes try to resemble MC as good as possible. This means especially the floor cover and
|
||
the type of plants and structures (shapes might differ). The terrain itself will be of course different
|
||
and depends on the mapgen.
|
||
Important: MC also takes the terrain into account while MT biomes don't care about the terrain at all
|
||
(except height).
|
||
MC has many “M” and “Hills” variants, most of which only differ in terrain compared to their original
|
||
counterpart.
|
||
In MT, any biome can occour in any terrain, so these variants are implied and are therefore
|
||
not explicitly implmented in MCL2. “M” variants are only included if they have another unique feature,
|
||
such as a different land cover.
|
||
In MCL2, MC biomes are usually split in two parts: A land part and an ocean part. Sometimes there's a beach/shore part as well.
|
||
|
||
The ocean biomes correspond to the MC Ocean biome.
|
||
|
||
Other intentionally missing biomes:
|
||
* River (generated by valleys and v7)
|
||
* Plateau (terrain only)
|
||
* Mesa (Bryce) (terrain only)
|
||
|
||
Tricky are the beach (esp. stone beach) and mushroom island biomes as they have specific conditions we can't check in MT. :(
|
||
TODO: Find a way to position these biomes accordingly.
|
||
|
||
]]
|
||
|
||
local DEEP_OCEAN_MAX = -11
|
||
local OCEAN_MIN = DEEP_OCEAN_MAX + 1
|
||
|
||
-- Ice Plains Spikes
|
||
minetest.register_biome({
|
||
name = "ice_plains_spikes",
|
||
node_top = "mcl_core:snowblock",
|
||
depth_top = 2,
|
||
node_filler = "mcl_core:snowblock",
|
||
depth_filler = 1,
|
||
node_water_top = "mcl_core:ice",
|
||
depth_water_top = 2,
|
||
node_river_water = "mcl_core:ice",
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 0,
|
||
humidity_point = 73,
|
||
})
|
||
minetest.register_biome({
|
||
name = "ice_plains_spikes_ocean",
|
||
node_top = "mcl_core:gravel",
|
||
depth_top = 2,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_water_top = "mcl_core:ice",
|
||
depth_water_top = 2,
|
||
node_river_water = "mcl_core:ice",
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = 0,
|
||
heat_point = 0,
|
||
humidity_point = 73,
|
||
})
|
||
|
||
-- Cold Taiga
|
||
minetest.register_biome({
|
||
name = "cold_taiga",
|
||
node_dust = "mcl_core:snow",
|
||
node_top = "mcl_core:dirt_with_grass_snow",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 2,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 3,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 0,
|
||
humidity_point = 40,
|
||
})
|
||
|
||
-- A cold beach-like biome
|
||
minetest.register_biome({
|
||
name = "cold_taiga_beach",
|
||
node_dust = "mcl_core:snow",
|
||
node_top = "mcl_core:sand",
|
||
depth_top = 2,
|
||
node_water_top = "mcl_core:ice",
|
||
depth_water_top = 1,
|
||
node_filler = "mcl_core:sandstone",
|
||
depth_filler = 2,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 1,
|
||
y_max = 2,
|
||
heat_point = 0,
|
||
humidity_point = 40,
|
||
})
|
||
-- Water part of the beach. Added to prevent snow being on the ice.
|
||
minetest.register_biome({
|
||
name = "cold_taiga_beach_water",
|
||
node_top = "mcl_core:sand",
|
||
depth_top = 2,
|
||
node_water_top = "mcl_core:ice",
|
||
depth_water_top = 1,
|
||
node_filler = "mcl_core:sandstone",
|
||
depth_filler = 2,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = -3,
|
||
y_max = 0,
|
||
heat_point = 0,
|
||
humidity_point = 40,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "cold_taiga_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = -4,
|
||
heat_point = 0,
|
||
humidity_point = 40,
|
||
})
|
||
|
||
-- Mega Taiga
|
||
minetest.register_biome({
|
||
name = "mega_taiga",
|
||
node_top = "mcl_core:podzol",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 26,
|
||
humidity_point = 72,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "mega_taiga_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = 0,
|
||
heat_point = 26,
|
||
humidity_point = 72,
|
||
})
|
||
|
||
-- Mega Spruce Taiga
|
||
minetest.register_biome({
|
||
name = "mega_spruce_taiga",
|
||
node_top = "mcl_core:podzol",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 21,
|
||
humidity_point = 72,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "mega_spruce_taiga_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = 0,
|
||
heat_point = 21,
|
||
humidity_point = 72,
|
||
})
|
||
|
||
-- Extreme Hills
|
||
minetest.register_biome({
|
||
name = "extreme_hills",
|
||
node_top = "mcl_core:dirt_with_grass",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 4,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 4,
|
||
y_min = 4,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 31,
|
||
humidity_point = 30,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "extreme_hills_beach",
|
||
node_top = "mcl_core:sand",
|
||
depth_top = 2,
|
||
depth_water_top = 1,
|
||
node_filler = "mcl_core:sandstone",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 4,
|
||
y_min = -3,
|
||
y_max = 3,
|
||
heat_point = 31,
|
||
humidity_point = 30,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "extreme_hills_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 4,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 4,
|
||
y_min = OCEAN_MIN,
|
||
y_max = -4,
|
||
heat_point = 31,
|
||
humidity_point = 30,
|
||
})
|
||
|
||
-- Extreme Hills M
|
||
minetest.register_biome({
|
||
name = "extreme_hills_m",
|
||
node_top = "mcl_core:gravel",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:gravel",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:gravel",
|
||
depth_riverbed = 3,
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 28,
|
||
humidity_point = 30,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "extreme_hills_m_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 3,
|
||
y_min = OCEAN_MIN,
|
||
y_max = 0,
|
||
heat_point = 28,
|
||
humidity_point = 30,
|
||
})
|
||
|
||
-- Extreme Hills+
|
||
-- This biome is identical to Extreme Hills on the surface but has snow-covered mountains with spruce/oak
|
||
-- forests above a certain hight.
|
||
minetest.register_biome({
|
||
name = "extreme_hills_plus",
|
||
node_top = "mcl_core:dirt_with_grass",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 4,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 4,
|
||
y_min = 1,
|
||
y_max = 44,
|
||
heat_point = 31,
|
||
humidity_point = 35,
|
||
})
|
||
|
||
---- Sub-biome Extra biome for Extreme Hills+ for those snow forests
|
||
minetest.register_biome({
|
||
name = "extreme_hills_plus_snowtop",
|
||
node_dust = "mcl_core:snow",
|
||
node_top = "mcl_core:dirt_with_grass_snow",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 4,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 4,
|
||
y_min = 45,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 31,
|
||
humidity_point = 35,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "extreme_hills_plus_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 4,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 4,
|
||
y_min = OCEAN_MIN,
|
||
y_max = 0,
|
||
heat_point = 31,
|
||
humidity_point = 35,
|
||
})
|
||
|
||
-- Stone Beach
|
||
minetest.register_biome({
|
||
name = "stone_beach",
|
||
y_min = -6,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 31,
|
||
humidity_point = 15,
|
||
})
|
||
minetest.register_biome({
|
||
name = "stone_beach_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
filler_depth = 2,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 1,
|
||
y_min = OCEAN_MIN,
|
||
y_max = -7,
|
||
heat_point = 31,
|
||
humidity_point = 15,
|
||
})
|
||
|
||
-- Ice Plains
|
||
minetest.register_biome({
|
||
name = "ice_plains",
|
||
node_dust = "mcl_core:snow",
|
||
node_top = "mcl_core:dirt_with_grass_snow",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 2,
|
||
node_water_top = "mcl_core:ice",
|
||
depth_water_top = 2,
|
||
node_river_water = "mcl_core:ice",
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 13,
|
||
humidity_point = 79,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "ice_plains_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = 0,
|
||
heat_point = 13,
|
||
humidity_point = 79,
|
||
})
|
||
|
||
-- Plains
|
||
minetest.register_biome({
|
||
name = "plains",
|
||
node_top = "mcl_core:dirt_with_grass",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 2,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 4,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 26,
|
||
humidity_point = 45,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "plains_beach",
|
||
node_top = "mcl_core:sand",
|
||
depth_top = 2,
|
||
node_filler = "mcl_core:sandstone",
|
||
depth_filler = 2,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 3,
|
||
y_max = 1,
|
||
heat_point = 26,
|
||
humidity_point = 45,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "plains_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = 0,
|
||
heat_point = 26,
|
||
humidity_point = 45,
|
||
})
|
||
|
||
-- TODO: Sunflower Plains
|
||
--[[
|
||
minetest.register_biome({
|
||
name = "sunflower_plains",
|
||
node_top = "mcl_core:dirt_with_grass",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 2,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 4,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 26,
|
||
humidity_point = 22.5,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "sunflower_plains_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:dirt",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = 0,
|
||
heat_point = 26,
|
||
humidity_point = 22.5,
|
||
})
|
||
]]
|
||
|
||
-- Taiga
|
||
minetest.register_biome({
|
||
name = "taiga",
|
||
node_top = "mcl_core:dirt_with_grass",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 4,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 47,
|
||
humidity_point = 73, --was 70
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "taiga_beach",
|
||
node_top = "mcl_core:sand",
|
||
depth_top = 2,
|
||
node_filler = "mcl_core:sandstone",
|
||
depth_filler = 1,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 1,
|
||
y_max = 3,
|
||
heat_point = 47,
|
||
humidity_point = 73, --was 70
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "taiga_ocean",
|
||
node_top = "mcl_core:sand",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = 0,
|
||
heat_point = 47,
|
||
humidity_point = 73, --was 70
|
||
})
|
||
|
||
-- Forest
|
||
minetest.register_biome({
|
||
name = "forest",
|
||
node_top = "mcl_core:dirt_with_grass",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 33,
|
||
humidity_point = 44, --was 68
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "forest_beach",
|
||
node_top = "mcl_core:sand",
|
||
depth_top = 2,
|
||
node_filler = "mcl_core:sandstone",
|
||
depth_filler = 1,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = -1,
|
||
y_max = 0,
|
||
heat_point = 33,
|
||
humidity_point = 44, --was 68
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "forest_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = -2,
|
||
heat_point = 33,
|
||
humidity_point = 44, --was 68
|
||
})
|
||
|
||
-- Flower Forest
|
||
minetest.register_biome({
|
||
name = "flower_forest",
|
||
node_top = "mcl_core:dirt_with_grass",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 3,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 33,
|
||
humidity_point = 51,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "flower_forest_beach",
|
||
node_top = "mcl_core:sand",
|
||
depth_top = 2,
|
||
node_filler = "mcl_core:sandstone",
|
||
depth_filler = 1,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = -2,
|
||
y_max = 2,
|
||
heat_point = 33,
|
||
humidity_point = 51,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "flower_forest_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = -3,
|
||
heat_point = 33,
|
||
humidity_point = 51,
|
||
})
|
||
|
||
-- Birch Forest
|
||
minetest.register_biome({
|
||
name = "birch_forest",
|
||
node_top = "mcl_core:dirt_with_grass",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 20,
|
||
humidity_point = 49,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "birch_forest_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = 0,
|
||
heat_point = 20,
|
||
humidity_point = 49,
|
||
})
|
||
|
||
-- Birch Forest M
|
||
minetest.register_biome({
|
||
name = "birch_forest_m",
|
||
node_top = "mcl_core:dirt_with_grass",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 20,
|
||
humidity_point = 44,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "birch_forest_m_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = 0,
|
||
heat_point = 20,
|
||
humidity_point = 44,
|
||
})
|
||
|
||
-- Desert
|
||
minetest.register_biome({
|
||
name = "desert",
|
||
node_top = "mcl_core:sand",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:sand",
|
||
depth_filler = 2,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
node_stone = "mcl_core:sandstone",
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 57,
|
||
humidity_point = 0, --was 0
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "desert_ocean",
|
||
node_top = "mcl_core:sand",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:sand",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = 0,
|
||
heat_point = 57,
|
||
humidity_point = 0, --was 0
|
||
})
|
||
|
||
-- Roofed Forest
|
||
minetest.register_biome({
|
||
name = "roofed_forest",
|
||
node_top = "mcl_core:dirt_with_grass",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 2,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 26,
|
||
humidity_point = 0,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "roofed_forest_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 1,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = 0,
|
||
heat_point = 26,
|
||
humidity_point = 0,
|
||
})
|
||
|
||
-- Mesa
|
||
minetest.register_biome({
|
||
name = "mesa",
|
||
node_top = "mcl_colorblocks:hardened_clay",
|
||
depth_top = 1,
|
||
node_filler = "mcl_colorblocks:hardened_clay",
|
||
node_stone = "mcl_colorblocks:hardened_clay",
|
||
y_min = 11,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 88,
|
||
humidity_point = 20,
|
||
})
|
||
|
||
-- Helper biome for the red sand at the bottom of mesas.
|
||
-- This is part of the regular mesa.
|
||
minetest.register_biome({
|
||
name = "mesa_sandlevel",
|
||
node_top = "mcl_core:redsand",
|
||
depth_top = 1,
|
||
node_filler = "mcl_colorblocks:hardened_clay_orange",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:redsand",
|
||
depth_riverbed = 1,
|
||
node_stone = "mcl_colorblocks:hardened_clay_orange",
|
||
y_min = -3,
|
||
y_max = 10,
|
||
heat_point = 88,
|
||
humidity_point = 20,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "mesa_ocean",
|
||
node_top = "mcl_core:sand",
|
||
depth_top = 3,
|
||
node_filler = "mcl_core:sand",
|
||
depth_filler = 2,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = -4,
|
||
heat_point = 88,
|
||
humidity_point = 20,
|
||
})
|
||
|
||
-- Mesa Plateau F
|
||
-- Identical to Mesa below Y=30. Y=30 and above is replaced with an oak forest
|
||
minetest.register_biome({
|
||
name = "mesa_plateau_f",
|
||
node_top = "mcl_colorblocks:hardened_clay",
|
||
depth_top = 1,
|
||
node_filler = "mcl_colorblocks:hardened_clay",
|
||
node_stone = "mcl_colorblocks:hardened_clay",
|
||
y_min = 11,
|
||
y_max = 29,
|
||
heat_point = 64,
|
||
humidity_point = 37,
|
||
})
|
||
|
||
-- The actual plateau of this biome
|
||
-- This is a mesa plateau for grass blocks, tall grass and oaks.
|
||
minetest.register_biome({
|
||
name = "mesa_plateau_f_grasstop",
|
||
node_top = "mcl_core:dirt_with_grass",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
filler_depth = 1,
|
||
node_stone = "mcl_colorblocks:hardened_clay",
|
||
y_min = 30,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 64,
|
||
humidity_point = 37,
|
||
})
|
||
|
||
-- Helper biome for the red sand at the bottom.
|
||
minetest.register_biome({
|
||
name = "mesa_plateau_f_sandlevel",
|
||
node_top = "mcl_core:redsand",
|
||
depth_top = 1,
|
||
node_filler = "mcl_colorblocks:hardened_clay_orange",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:redsand",
|
||
depth_riverbed = 1,
|
||
node_stone = "mcl_colorblocks:hardened_clay_orange",
|
||
y_min = -3,
|
||
y_max = 10,
|
||
heat_point = 64,
|
||
humidity_point = 37,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "mesa_plateau_f_ocean",
|
||
node_top = "mcl_core:sand",
|
||
depth_top = 3,
|
||
node_filler = "mcl_colorblocks:sand",
|
||
depth_filler = 2,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = -4,
|
||
heat_point = 64,
|
||
humidity_point = 37,
|
||
})
|
||
|
||
-- Savanna
|
||
minetest.register_biome({
|
||
name = "savanna",
|
||
node_top = "mcl_core:dirt_with_grass",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 2,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 50,
|
||
humidity_point = 46,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "savanna_beach",
|
||
node_top = "mcl_core:sand",
|
||
depth_top = 3,
|
||
node_filler = "mcl_core:sandstone",
|
||
depth_filler = 2,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = -1,
|
||
y_max = 0,
|
||
heat_point = 50,
|
||
humidity_point = 46,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "savanna_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = -2,
|
||
heat_point = 50,
|
||
humidity_point = 46,
|
||
})
|
||
|
||
-- Savanna M
|
||
-- Extras: Coarse Dirt. No sand beach.
|
||
-- Otherwise identical to Savanna
|
||
minetest.register_biome({
|
||
name = "savanna_m",
|
||
node_top = "mcl_core:dirt_with_grass",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:coarse_dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 55,
|
||
humidity_point = 46,
|
||
})
|
||
minetest.register_biome({
|
||
name = "savanna_m_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = 0,
|
||
heat_point = 55,
|
||
humidity_point = 46,
|
||
})
|
||
|
||
-- Jungle
|
||
minetest.register_biome({
|
||
name = "jungle",
|
||
node_top = "mcl_core:dirt_with_grass",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 90,
|
||
humidity_point = 91,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "jungle_shore",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = -1,
|
||
y_max = 0,
|
||
heat_point = 90,
|
||
humidity_point = 91,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "jungle_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = -2,
|
||
heat_point = 90,
|
||
humidity_point = 91,
|
||
})
|
||
|
||
-- Jungle Edge
|
||
minetest.register_biome({
|
||
name = "jungle_edge",
|
||
node_top = "mcl_core:dirt_with_grass",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 2,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 90,
|
||
humidity_point = 87,
|
||
})
|
||
minetest.register_biome({
|
||
name = "jungle_edge_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 2,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = 0,
|
||
heat_point = 90,
|
||
humidity_point = 87,
|
||
})
|
||
|
||
-- Jungle Edge M
|
||
-- Almost identical Jungle Edge. Has deeper dirt. Melons spawn here a lot (TODO).
|
||
-- TODO: Must be super rare
|
||
|
||
minetest.register_biome({
|
||
name = "jungle_edge_m",
|
||
node_top = "mcl_core:dirt_with_grass",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 4,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
heat_point = 90,
|
||
humidity_point = 90,
|
||
})
|
||
minetest.register_biome({
|
||
name = "jungle_edge_m_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 4,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = 0,
|
||
heat_point = 90,
|
||
humidity_point = 90,
|
||
})
|
||
|
||
-- Swampland
|
||
minetest.register_biome({
|
||
name = "swampland",
|
||
node_top = "mcl_core:dirt_with_grass",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 1,
|
||
-- Note: Limited in height!
|
||
y_max = 23,
|
||
heat_point = 60,
|
||
humidity_point = 99,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "swampland_shore",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = -4,
|
||
y_max = 0,
|
||
heat_point = 60,
|
||
humidity_point = 99,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "swampland_ocean",
|
||
node_top = "mcl_core:sand",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:sand",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = -5,
|
||
heat_point = 60,
|
||
humidity_point = 99,
|
||
})
|
||
|
||
-- Mushroom Island / Mushroom Island Shore
|
||
-- TODO: Make sure these biomes only spawn in islands
|
||
minetest.register_biome({
|
||
name = "mushroom_island",
|
||
node_top = "mcl_core:mycelium",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 4,
|
||
-- Note: Limited in height!
|
||
y_max = 20,
|
||
heat_point = 99,
|
||
humidity_point = 99,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "mushroom_island_shore",
|
||
node_top = "mcl_core:mycelium",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = 1,
|
||
y_max = 3,
|
||
heat_point = 99,
|
||
humidity_point = 99,
|
||
})
|
||
|
||
minetest.register_biome({
|
||
name = "mushroom_island_ocean",
|
||
node_top = "mcl_core:dirt",
|
||
depth_top = 1,
|
||
node_filler = "mcl_core:dirt",
|
||
depth_filler = 3,
|
||
node_riverbed = "mcl_core:sand",
|
||
depth_riverbed = 2,
|
||
y_min = OCEAN_MIN,
|
||
y_max = 0,
|
||
heat_point = 99,
|
||
humidity_point = 99,
|
||
})
|
||
|
||
-- Deep Ocean
|
||
-- Special biome below all other ocean biomes, used for generating gravel
|
||
minetest.register_biome({
|
||
name = "deep_ocean",
|
||
node_top = "mcl_core:gravel",
|
||
depth_top = 2,
|
||
node_filler = "mcl_core:gravel",
|
||
depth_filler = 2,
|
||
node_riverbed = "mcl_core:gravel",
|
||
depth_riverbed = 2,
|
||
y_min = mcl_vars.mg_overworld_min,
|
||
y_max = DEEP_OCEAN_MAX,
|
||
heat_point = 50,
|
||
humidity_point = 50,
|
||
})
|
||
|
||
end
|
||
|
||
-- Register biomes of non-Overworld biomes
|
||
local function register_dimension_biomes()
|
||
--[[ REALMS ]]
|
||
|
||
--[[ THE NETHER ]]
|
||
minetest.register_biome({
|
||
name = "nether",
|
||
node_filler = "mcl_nether:netherrack",
|
||
node_stone = "mcl_nether:netherrack",
|
||
node_water = "air",
|
||
node_river_water = "air",
|
||
y_min = mcl_vars.mg_nether_min,
|
||
-- FIXME: For some reason the Nether stops generating early if this constant is not added.
|
||
-- Figure out why.
|
||
y_max = mcl_vars.mg_nether_max + 80,
|
||
heat_point = 100,
|
||
humidity_point = 0,
|
||
})
|
||
|
||
--[[ THE END ]]
|
||
minetest.register_biome({
|
||
name = "end",
|
||
node_stone = "air",
|
||
node_filler = "air",
|
||
node_water = "air",
|
||
node_river_water = "air",
|
||
-- FIXME: For some reason the End stops generating early if this constant is not added.
|
||
-- Figure out why.
|
||
y_min = mcl_vars.mg_end_min,
|
||
y_max = mcl_vars.mg_end_max + 80,
|
||
heat_point = 50,
|
||
humidity_point = 50,
|
||
})
|
||
|
||
end
|
||
|
||
-- Register “fake” ores directly related to the biomes
|
||
local function register_biomelike_ores()
|
||
|
||
-- Random coarse dirt floor in Mega Taiga and Mesa Plateau F
|
||
minetest.register_ore({
|
||
ore_type = "sheet",
|
||
ore = "mcl_core:coarse_dirt",
|
||
wherein = {"mcl_core:podzol", "mcl_core:dirt"},
|
||
clust_scarcity = 1,
|
||
clust_num_ores = 12,
|
||
clust_size = 10,
|
||
y_min = mcl_vars.mg_overworld_min,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
noise_threshold = 0.2,
|
||
noise_params = {offset=0, scale=15, spread={x=130, y=130, z=130}, seed=24, octaves=3, persist=0.70},
|
||
biomes = { "mega_taiga" },
|
||
})
|
||
|
||
minetest.register_ore({
|
||
ore_type = "sheet",
|
||
ore = "mcl_core:coarse_dirt",
|
||
wherein = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||
column_height_max = 1,
|
||
column_midpoint_factor = 0.0,
|
||
y_min = mcl_vars.mg_overworld_min,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
noise_threshold = 0.0,
|
||
noise_params = {offset=0, scale=15, spread={x=250, y=250, z=250}, seed=24, octaves=3, persist=0.70},
|
||
biomes = { "mesa_plateau_f_grasstop" },
|
||
})
|
||
minetest.register_ore({
|
||
ore_type = "blob",
|
||
ore = "mcl_core:coarse_dirt",
|
||
wherein = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||
clust_scarcity = 1500,
|
||
clust_num_ores = 25,
|
||
clust_size = 7,
|
||
y_min = mcl_vars.mg_overworld_min,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
biomes = { "mesa_plateau_f_grasstop" },
|
||
})
|
||
|
||
-- Small dirt patches in Extreme Hills M
|
||
minetest.register_ore({
|
||
ore_type = "blob",
|
||
-- TODO: Should be grass block. But generating this as ore means gras blocks will spawn undeground. :-(
|
||
ore = "mcl_core:dirt",
|
||
wherein = {"mcl_core:gravel"},
|
||
clust_scarcity = 5000,
|
||
clust_num_ores = 12,
|
||
clust_size = 4,
|
||
y_min = mcl_vars.mg_overworld_min,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
noise_threshold = 0.2,
|
||
noise_params = {offset=0, scale=5, spread={x=250, y=250, z=250}, seed=64, octaves=3, persist=0.60},
|
||
biomes = { "extreme_hills_m" },
|
||
})
|
||
|
||
-- Mesa strata (registered as sheet ores)
|
||
|
||
-- Helper function
|
||
-- Colors to use: silver (light grey), brown, orange, red, yellow, white
|
||
local stratum = function(y_min, height, color, seed)
|
||
if not height then
|
||
height = 1
|
||
end
|
||
if not seed then
|
||
seed = 39
|
||
end
|
||
local y_max = y_min + height-1
|
||
minetest.register_ore({
|
||
ore_type = "sheet",
|
||
ore = "mcl_colorblocks:hardened_clay_"..color,
|
||
wherein = {"mcl_colorblocks:hardened_clay"},
|
||
column_height_min = height,
|
||
column_height_max = height,
|
||
y_min = y_min,
|
||
y_max = y_max,
|
||
noise_threshold = -1.0,
|
||
noise_params = {offset=0, scale=1, spread={x=3100, y=3100, z=3100}, seed=seed, octaves=3, persist=0.70},
|
||
biomes = { "mesa", "mesa_plateau_f" },
|
||
})
|
||
end
|
||
|
||
stratum(11, 3, "orange")
|
||
|
||
-- Create strata for up to Y = 256
|
||
-- This is semi-random based on the mapseed.
|
||
local seed = minetest.get_mapgen_setting("seed")
|
||
local i = 0
|
||
repeat
|
||
seed = seed + i
|
||
|
||
stratum(17+i, 1, "orange", seed)
|
||
stratum(19+i, 1, "silver", seed)
|
||
stratum(21+i, 1, "brown", seed)
|
||
stratum(22+i, 1, "red", seed)
|
||
stratum(24+i, 1, "silver", seed)
|
||
stratum(26+i, 1, "brown", seed)
|
||
stratum(27+i, 1, "white", seed)
|
||
stratum(29+i, 1, "orange", seed)
|
||
stratum(34+i, 1, "red", seed)
|
||
stratum(42+i, 1, "orange", seed)
|
||
stratum(44+i, 1, "yellow", seed)
|
||
stratum(46+i, 1, "brown", seed)
|
||
stratum(48+i, 1, "silver", seed)
|
||
stratum(51+i, 1, "white", seed)
|
||
stratum(55+i, 2, "yellow", seed)
|
||
stratum(58+i, 2, "orange", seed)
|
||
stratum(62+i, 1, "brown", seed)
|
||
stratum(68+i, 3, "orange", seed)
|
||
stratum(73+i, 2, "brown", seed)
|
||
stratum(76+i, 1, "white", seed)
|
||
-- Repeat strata above Y=76
|
||
|
||
i = i + 66
|
||
until i > 256
|
||
end
|
||
|
||
-- Non-Overworld ores
|
||
local function register_dimension_ores()
|
||
|
||
--[[ NETHER GENERATION ]]
|
||
|
||
-- Soul sand
|
||
minetest.register_ore({
|
||
ore_type = "sheet",
|
||
ore = "mcl_nether:soul_sand",
|
||
-- Note: Stone is included only for v6 mapgen support. Netherrack is not generated naturally
|
||
-- in v6, but instead set with the on_generated function in mcl_mapgen_core.
|
||
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
|
||
clust_scarcity = 13 * 13 * 13,
|
||
clust_size = 5,
|
||
y_min = mcl_vars.mg_nether_min,
|
||
y_max = mcl_util.layer_to_y(64, "nether"),
|
||
noise_threshold = 0.0,
|
||
noise_params = {
|
||
offset = 0.5,
|
||
scale = 0.1,
|
||
spread = {x = 5, y = 5, z = 5},
|
||
seed = 2316,
|
||
octaves = 1,
|
||
persist = 0.0
|
||
},
|
||
})
|
||
|
||
-- Magma blocks
|
||
minetest.register_ore({
|
||
ore_type = "blob",
|
||
ore = "mcl_nether:magma",
|
||
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
|
||
clust_scarcity = 8*8*8,
|
||
clust_num_ores = 45,
|
||
clust_size = 6,
|
||
y_min = mcl_util.layer_to_y(23, "nether"),
|
||
y_max = mcl_util.layer_to_y(37, "nether"),
|
||
})
|
||
minetest.register_ore({
|
||
ore_type = "blob",
|
||
ore = "mcl_nether:magma",
|
||
wherein = {"mcl_nether:netherrack"},
|
||
clust_scarcity = 10*10*10,
|
||
clust_num_ores = 65,
|
||
clust_size = 8,
|
||
y_min = mcl_util.layer_to_y(23, "nether"),
|
||
y_max = mcl_util.layer_to_y(37, "nether"),
|
||
})
|
||
|
||
-- Glowstone
|
||
minetest.register_ore({
|
||
ore_type = "blob",
|
||
ore = "mcl_nether:glowstone",
|
||
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
|
||
clust_scarcity = 26 * 26 * 26,
|
||
clust_size = 5,
|
||
y_min = mcl_vars.mg_lava_nether_max + 10,
|
||
y_max = mcl_vars.mg_nether_max,
|
||
noise_threshold = 0.0,
|
||
noise_params = {
|
||
offset = 0.5,
|
||
scale = 0.1,
|
||
spread = {x = 5, y = 5, z = 5},
|
||
seed = 17676,
|
||
octaves = 1,
|
||
persist = 0.0
|
||
},
|
||
})
|
||
|
||
-- Gravel (Nether)
|
||
minetest.register_ore({
|
||
ore_type = "sheet",
|
||
ore = "mcl_core:gravel",
|
||
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
|
||
column_height_min = 1,
|
||
column_height_max = 1,
|
||
column_midpoint_factor = 0,
|
||
y_min = mcl_util.layer_to_y(63, "nether"),
|
||
-- This should be 65, but for some reason with this setting, the sheet ore really stops at 65. o_O
|
||
y_max = mcl_util.layer_to_y(65+2, "nether"),
|
||
noise_threshold = 0.2,
|
||
noise_params = {
|
||
offset = 0.0,
|
||
scale = 0.5,
|
||
spread = {x = 20, y = 20, z = 20},
|
||
seed = 766,
|
||
octaves = 3,
|
||
persist = 0.6,
|
||
},
|
||
})
|
||
|
||
-- Nether quartz
|
||
minetest.register_ore({
|
||
ore_type = "scatter",
|
||
ore = "mcl_nether:quartz_ore",
|
||
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
|
||
clust_scarcity = 850,
|
||
clust_num_ores = 4, -- MC cluster amount: 4-10
|
||
clust_size = 3,
|
||
y_min = mcl_vars.mg_nether_min,
|
||
y_max = mcl_vars.mg_nether_max,
|
||
})
|
||
minetest.register_ore({
|
||
ore_type = "scatter",
|
||
ore = "mcl_nether:quartz_ore",
|
||
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
|
||
clust_scarcity = 1650,
|
||
clust_num_ores = 8, -- MC cluster amount: 4-10
|
||
clust_size = 4,
|
||
y_min = mcl_vars.mg_nether_min,
|
||
y_max = mcl_vars.mg_nether_max,
|
||
})
|
||
|
||
-- Lava springs in the Nether
|
||
minetest.register_ore({
|
||
ore_type = "scatter",
|
||
ore = "mcl_nether:nether_lava_source",
|
||
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
|
||
clust_scarcity = 500,
|
||
clust_num_ores = 1,
|
||
clust_size = 1,
|
||
y_min = mcl_vars.mg_nether_min,
|
||
y_max = mcl_vars.mg_lava_nether_max + 1,
|
||
})
|
||
|
||
minetest.register_ore({
|
||
ore_type = "scatter",
|
||
ore = "mcl_nether:nether_lava_source",
|
||
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
|
||
clust_scarcity = 1000,
|
||
clust_num_ores = 1,
|
||
clust_size = 1,
|
||
y_min = mcl_vars.mg_lava_nether_max + 2,
|
||
y_max = mcl_vars.mg_lava_nether_max + 12,
|
||
})
|
||
|
||
minetest.register_ore({
|
||
ore_type = "scatter",
|
||
ore = "mcl_nether:nether_lava_source",
|
||
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
|
||
clust_scarcity = 2000,
|
||
clust_num_ores = 1,
|
||
clust_size = 1,
|
||
y_min = mcl_vars.mg_lava_nether_max + 13,
|
||
y_max = mcl_vars.mg_lava_nether_max + 48,
|
||
})
|
||
minetest.register_ore({
|
||
ore_type = "scatter",
|
||
ore = "mcl_nether:nether_lava_source",
|
||
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
|
||
clust_scarcity = 3500,
|
||
clust_num_ores = 1,
|
||
clust_size = 1,
|
||
y_min = mcl_vars.mg_lava_nether_max + 49,
|
||
y_max = mcl_vars.mg_nether_max,
|
||
})
|
||
|
||
--[[ THE END ]]
|
||
|
||
-- Generate fake End
|
||
-- TODO: Remove both "ores" when there's a better End generator
|
||
|
||
minetest.register_ore({
|
||
ore_type = "sheet",
|
||
ore = "mcl_end:end_stone",
|
||
wherein = {"air"},
|
||
y_min = mcl_vars.mg_end_min+64,
|
||
y_max = mcl_vars.mg_end_min+80,
|
||
column_height_min = 6,
|
||
column_height_max = 7,
|
||
column_midpoint_factor = 0.0,
|
||
noise_params = {
|
||
offset = -2,
|
||
scale = 8,
|
||
spread = {x=100, y=100, z=100},
|
||
seed = 2999,
|
||
octaves = 5,
|
||
persist = 0.55,
|
||
},
|
||
noise_threshold = 0,
|
||
})
|
||
|
||
minetest.register_ore({
|
||
ore_type = "sheet",
|
||
ore = "mcl_end:end_stone",
|
||
wherein = {"air"},
|
||
y_min = mcl_vars.mg_end_min+64,
|
||
y_max = mcl_vars.mg_end_min+80,
|
||
column_height_min = 4,
|
||
column_height_max = 4,
|
||
column_midpoint_factor = 0.0,
|
||
noise_params = {
|
||
offset = -4,
|
||
scale = 3,
|
||
spread = {x=200, y=200, z=200},
|
||
seed = 5390,
|
||
octaves = 5,
|
||
persist = 0.6,
|
||
},
|
||
noise_threshold = 0,
|
||
})
|
||
|
||
end
|
||
|
||
|
||
-- All mapgens except mgv6
|
||
|
||
-- Template to register a grass or fern decoration
|
||
local function register_grass_decoration(grasstype, offset, scale, biomes)
|
||
local place_on, seed, node
|
||
if grasstype == "fern" then
|
||
node = "mcl_flowers:fern"
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:podzol"}
|
||
seed = 333
|
||
elseif grasstype == "tallgrass" then
|
||
node = "mcl_flowers:tallgrass"
|
||
place_on = {"mcl_core:dirt_with_grass"}
|
||
seed = 420
|
||
end
|
||
local noise = {
|
||
offset = offset,
|
||
scale = scale,
|
||
spread = {x = 200, y = 200, z = 200},
|
||
seed = seed,
|
||
octaves = 3,
|
||
persist = 0.6
|
||
}
|
||
minetest.register_decoration({
|
||
deco_type = "simple",
|
||
place_on = place_on,
|
||
sidelen = 16,
|
||
noise_params = noise,
|
||
biomes = biomes,
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
decoration = node,
|
||
})
|
||
end
|
||
|
||
local function register_decorations()
|
||
-- Large ice spike
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:snowblock", "mcl_core:snow", "mcl_core:dirt_with_grass_snow"},
|
||
sidelen = 80,
|
||
noise_params = {
|
||
offset = 0.00040,
|
||
scale = 0.001,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 1133,
|
||
octaves = 4,
|
||
persist = 0.67,
|
||
},
|
||
biomes = {"ice_plains_spikes"},
|
||
y_min = 4,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_ice_spike_large.mts",
|
||
rotation = "random",
|
||
flags = "place_center_x, place_center_z",
|
||
})
|
||
|
||
-- Small ice spike
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:snowblock", "mcl_core:snow", "mcl_core:dirt_with_grass_snow"},
|
||
sidelen = 80,
|
||
noise_params = {
|
||
offset = 0.005,
|
||
scale = 0.001,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 1133,
|
||
octaves = 4,
|
||
persist = 0.67,
|
||
},
|
||
biomes = {"ice_plains_spikes"},
|
||
y_min = 4,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_ice_spike_small.mts",
|
||
rotation = "random",
|
||
flags = "place_center_x, place_center_z",
|
||
})
|
||
|
||
-- Oak
|
||
-- Large oaks
|
||
for i=1, 2 do
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||
sidelen = 80,
|
||
noise_params = {
|
||
offset = 0.00075,
|
||
scale = 0.0011,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 3,
|
||
octaves = 3,
|
||
persist = 0.66
|
||
},
|
||
biomes = {"forest"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_large_"..i..".mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:dirt_with_grass_snow"},
|
||
sidelen = 80,
|
||
noise_params = {
|
||
offset = -0.0004,
|
||
scale = 0.001,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 3,
|
||
octaves = 3,
|
||
persist = 0.6
|
||
},
|
||
biomes = {"extreme_hills", "extreme_hills_m", "extreme_hills_plus", "extreme_hills_plus_snowtop"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_large_"..i..".mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
end
|
||
-- Small classic oak (forest, flower forest and ice plains)
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0.025,
|
||
scale = 0.0022,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 2,
|
||
octaves = 3,
|
||
persist = 0.66
|
||
},
|
||
biomes = {"forest"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0.01,
|
||
scale = 0.0022,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 2,
|
||
octaves = 3,
|
||
persist = 0.66
|
||
},
|
||
biomes = {"flower_forest"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:dirt_with_grass_snow"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0.0,
|
||
scale = 0.002,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 2,
|
||
octaves = 3,
|
||
persist = 0.7
|
||
},
|
||
biomes = {"extreme_hills", "extreme_hills_m", "extreme_hills_plus", "extreme_hills_plus_snowtop"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass_snow", "mcl_core:dirt"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0.006,
|
||
scale = 0.002,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 2,
|
||
octaves = 3,
|
||
persist = 0.7
|
||
},
|
||
biomes = {"extreme_hills_plus", "extreme_hills_plus_snowtop"},
|
||
y_min = 50,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0.015,
|
||
scale = 0.002,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 2,
|
||
octaves = 3,
|
||
persist = 0.7
|
||
},
|
||
biomes = {"mesa_plateau_f_grasstop"},
|
||
y_min = 30,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:dirt_with_grass_snow"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0.0,
|
||
scale = 0.0002,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 2,
|
||
octaves = 3,
|
||
persist = 0.7
|
||
},
|
||
biomes = {"ice_plains"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
-- Rare balloon oak
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0.002083,
|
||
scale = 0.0022,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 3,
|
||
octaves = 3,
|
||
persist = 0.6,
|
||
},
|
||
biomes = {"forest"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_balloon.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
-- Swamp oak
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||
sidelen = 80,
|
||
noise_params = {
|
||
offset = 0.0055,
|
||
scale = 0.0011,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 5005,
|
||
octaves = 5,
|
||
persist = 0.6,
|
||
},
|
||
biomes = {"swampland", "swampland_shore"},
|
||
y_min = 0,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_swamp.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
|
||
-- Jungle tree
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||
sidelen = 80,
|
||
fill_ratio = 0.0025,
|
||
biomes = {"jungle"},
|
||
y_min = 4,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_jungle_tree_huge.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||
sidelen = 80,
|
||
fill_ratio = 0.045,
|
||
biomes = {"jungle"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_jungle_tree.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||
sidelen = 80,
|
||
fill_ratio = 0.0045,
|
||
biomes = {"jungle_edge", "jungle_edge_m"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_jungle_tree.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
|
||
-- Oak in jungle / jungle edge
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||
sidelen = 80,
|
||
fill_ratio = 0.004,
|
||
biomes = {"jungle"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||
sidelen = 80,
|
||
fill_ratio = 0.0004,
|
||
biomes = {"jungle_edge", "jungle_edge_m"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
|
||
-- Spruce
|
||
local function quick_spruce(seed, offset, sprucename, biomes, y)
|
||
if not y then
|
||
y = 2
|
||
end
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:podzol"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = offset,
|
||
scale = 0.0006,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = seed,
|
||
octaves = 3,
|
||
persist = 0.66
|
||
},
|
||
biomes = biomes,
|
||
y_min = y,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/"..sprucename,
|
||
flags = "place_center_x, place_center_z",
|
||
})
|
||
end
|
||
|
||
-- Huge spruce
|
||
quick_spruce(3000, 0.005, "mcl_core_spruce_huge_1.mts", {"mega_spruce_taiga"})
|
||
quick_spruce(4000, 0.005, "mcl_core_spruce_huge_2.mts", {"mega_spruce_taiga"})
|
||
quick_spruce(6000, 0.005, "mcl_core_spruce_huge_3.mts", {"mega_spruce_taiga"})
|
||
|
||
quick_spruce(3000, 0.0008, "mcl_core_spruce_huge_up_1.mts", {"mega_taiga"})
|
||
quick_spruce(4000, 0.0008, "mcl_core_spruce_huge_up_2.mts", {"mega_taiga"})
|
||
quick_spruce(6000, 0.0008, "mcl_core_spruce_huge_up_3.mts", {"mega_taiga"})
|
||
|
||
|
||
-- Common spruce
|
||
quick_spruce(11000, 0.00150, "mcl_core_spruce_5.mts", {"taiga", "cold_taiga"})
|
||
|
||
quick_spruce(2500, 0.00325, "mcl_core_spruce_1.mts", {"mega_spruce_taiga", "mega_taiga", "taiga", "cold_taiga"})
|
||
quick_spruce(7000, 0.00425, "mcl_core_spruce_3.mts", {"mega_spruce_taiga", "mega_taiga", "taiga", "cold_taiga"})
|
||
quick_spruce(9000, 0.00325, "mcl_core_spruce_4.mts", {"mega_taiga", "taiga", "cold_taiga"})
|
||
|
||
quick_spruce(9500, 0.00500, "mcl_core_spruce_tall.mts", {"mega_taiga"})
|
||
|
||
quick_spruce(5000, 0.00250, "mcl_core_spruce_2.mts", {"mega_spruce_taiga", "mega_taiga"})
|
||
|
||
quick_spruce(11000, 0.000025, "mcl_core_spruce_5.mts", {"extreme_hills", "extreme_hills_m"})
|
||
quick_spruce(2500, 0.00005, "mcl_core_spruce_1.mts", {"extreme_hills", "extreme_hills_m"})
|
||
quick_spruce(7000, 0.00005, "mcl_core_spruce_3.mts", {"extreme_hills", "extreme_hills_m"})
|
||
quick_spruce(9000, 0.00005, "mcl_core_spruce_4.mts", {"extreme_hills", "extreme_hills_m"})
|
||
|
||
quick_spruce(11000, 0.001, "mcl_core_spruce_5.mts", {"extreme_hills_plus", "extreme_hills_plus_snowtop"}, 50)
|
||
quick_spruce(2500, 0.002, "mcl_core_spruce_1.mts", {"extreme_hills_plus", "extreme_hills_plus_snowtop"}, 50)
|
||
quick_spruce(7000, 0.003, "mcl_core_spruce_3.mts", {"extreme_hills_plus", "extreme_hills_plus_snowtop"}, 50)
|
||
quick_spruce(9000, 0.002, "mcl_core_spruce_4.mts", {"extreme_hills_plus", "extreme_hills_plus_snowtop"}, 50)
|
||
|
||
|
||
-- Small lollipop spruce
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0.004,
|
||
scale = 0.0022,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 2500,
|
||
octaves = 3,
|
||
persist = 0.66
|
||
},
|
||
biomes = {"taiga", "cold_taiga"},
|
||
y_min = 2,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_spruce_lollipop.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
})
|
||
|
||
-- Matchstick spruce: Very few leaves, tall trunk
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol"},
|
||
sidelen = 80,
|
||
noise_params = {
|
||
offset = -0.025,
|
||
scale = 0.025,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 2566,
|
||
octaves = 5,
|
||
persist = 0.60,
|
||
},
|
||
biomes = {"taiga", "cold_taiga"},
|
||
y_min = 3,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_spruce_matchstick.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
})
|
||
|
||
-- Rare spruce in ice plains
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass_snow"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = -0.00075,
|
||
scale = -0.0015,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 11,
|
||
octaves = 3,
|
||
persist = 0.7
|
||
},
|
||
biomes = {"ice_plains"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_spruce_5.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
})
|
||
|
||
-- Acacia (many variants)
|
||
for a=1, 7 do
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:coarse_dirt"},
|
||
sidelen = 16,
|
||
fill_ratio = 0.0002,
|
||
biomes = {"savanna", "savanna_m"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_acacia_"..a..".mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
end
|
||
|
||
-- Birch
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0.03,
|
||
scale = 0.0025,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 11,
|
||
octaves = 3,
|
||
persist = 0.66
|
||
},
|
||
biomes = {"birch_forest"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_birch.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
})
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0.03,
|
||
scale = 0.0025,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 11,
|
||
octaves = 3,
|
||
persist = 0.66
|
||
},
|
||
biomes = {"birch_forest_m"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_birch_tall.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
})
|
||
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0.000333,
|
||
scale = -0.0015,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 11,
|
||
octaves = 3,
|
||
persist = 0.66
|
||
},
|
||
biomes = {"forest", "flower_forest"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_birch.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
})
|
||
|
||
-- Dark Oak
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0.05,
|
||
scale = 0.0015,
|
||
spread = {x = 125, y = 125, z = 125},
|
||
seed = 223,
|
||
octaves = 3,
|
||
persist = 0.66
|
||
},
|
||
biomes = {"roofed_forest"},
|
||
y_min = 4,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_dark_oak.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
|
||
|
||
local ratio_mushroom = 0.0001
|
||
local ratio_mushroom_huge = ratio_mushroom * (11/12)
|
||
local ratio_mushroom_giant = ratio_mushroom * (1/12)
|
||
local ratio_mushroom_mycelium = 0.002
|
||
local ratio_mushroom_mycelium_huge = ratio_mushroom_mycelium * (11/12)
|
||
local ratio_mushroom_mycelium_giant = ratio_mushroom_mycelium * (1/12)
|
||
|
||
-- Huge Brown Mushroom
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = { "mcl_core:dirt_with_grass", "mcl_core:dirt" },
|
||
sidelen = 80,
|
||
fill_ratio = ratio_mushroom_huge,
|
||
biomes = { "roofed_forest" },
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_brown.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = { "mcl_core:dirt_with_grass", "mcl_core:dirt" },
|
||
sidelen = 80,
|
||
fill_ratio = ratio_mushroom_giant,
|
||
biomes = { "roofed_forest" },
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_brown.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = { "mcl_core:mycelium" },
|
||
sidelen = 80,
|
||
fill_ratio = ratio_mushroom_mycelium_huge,
|
||
biomes = { "mushroom_island", "mushroom_island_shore" },
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_brown.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = { "mcl_core:mycelium" },
|
||
sidelen = 80,
|
||
fill_ratio = ratio_mushroom_mycelium_giant,
|
||
biomes = { "mushroom_island", "mushroom_island_shore" },
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_brown.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
|
||
-- Huge Red Mushroom
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = { "mcl_core:dirt_with_grass", "mcl_core:dirt" },
|
||
sidelen = 80,
|
||
fill_ratio = ratio_mushroom_huge,
|
||
biomes = { "roofed_forest" },
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_red.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = { "mcl_core:dirt_with_grass", "mcl_core:dirt" },
|
||
sidelen = 80,
|
||
fill_ratio = ratio_mushroom_giant,
|
||
biomes = { "roofed_forest" },
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_red.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = { "mcl_core:mycelium" },
|
||
sidelen = 80,
|
||
fill_ratio = ratio_mushroom_mycelium_huge,
|
||
biomes = { "mushroom_island", "mushroom_island_shore" },
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_red.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = { "mcl_core:mycelium" },
|
||
sidelen = 80,
|
||
fill_ratio = ratio_mushroom_mycelium_giant,
|
||
biomes = { "mushroom_island", "mushroom_island_shore" },
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_red.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
rotation = "random",
|
||
})
|
||
|
||
-- Moss stone boulder (3×3)
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:podzol", "mcl_core:dirt", "mcl_core:coarse_dirt"},
|
||
sidelen = 80,
|
||
noise_params = {
|
||
offset = 0.00015,
|
||
scale = 0.001,
|
||
spread = {x = 300, y = 300, z = 300},
|
||
seed = 775703,
|
||
octaves = 4,
|
||
persist = 0.63,
|
||
},
|
||
biomes = {"mega_taiga", "mega_spruce_taiga"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_boulder.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
})
|
||
|
||
-- Small moss stone boulder (2×2)
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:podzol", "mcl_core:dirt", "mcl_core:coarse_dirt"},
|
||
sidelen = 80,
|
||
noise_params = {
|
||
offset = 0.001,
|
||
scale = 0.001,
|
||
spread = {x = 300, y = 300, z = 300},
|
||
seed = 775703,
|
||
octaves = 4,
|
||
persist = 0.63,
|
||
},
|
||
biomes = {"mega_taiga", "mega_spruce_taiga"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_boulder_small.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
})
|
||
|
||
-- Cacti
|
||
minetest.register_decoration({
|
||
deco_type = "simple",
|
||
place_on = {"group:sand"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = -0.012,
|
||
scale = 0.024,
|
||
spread = {x = 100, y = 100, z = 100},
|
||
seed = 257,
|
||
octaves = 3,
|
||
persist = 0.6
|
||
},
|
||
y_min = 4,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
decoration = "mcl_core:cactus",
|
||
biomes = {"desert","mesa","mesa_sandlevel","mesa_plateau_f","mesa_plateau_f_sandlevel"},
|
||
height = 1,
|
||
height_max = 3,
|
||
})
|
||
|
||
-- Sugar canes
|
||
minetest.register_decoration({
|
||
deco_type = "simple",
|
||
place_on = {"mcl_core:dirt", "mcl_core:coarse_dirt", "mcl_core:dirt_with_grass", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = -0.3,
|
||
scale = 0.7,
|
||
spread = {x = 100, y = 100, z = 100},
|
||
seed = 2,
|
||
octaves = 3,
|
||
persist = 0.7
|
||
},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
decoration = "mcl_core:reeds",
|
||
height = 1,
|
||
height_max = 3,
|
||
spawn_by = { "mcl_core:water_source", "group:frosted_ice" },
|
||
num_spawn_by = 1,
|
||
})
|
||
minetest.register_decoration({
|
||
deco_type = "simple",
|
||
place_on = {"mcl_core:dirt", "mcl_core:coarse_dirt", "mcl_core:dirt_with_grass", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0.0,
|
||
scale = 0.5,
|
||
spread = {x = 100, y = 100, z = 100},
|
||
seed = 2,
|
||
octaves = 3,
|
||
persist = 0.7,
|
||
},
|
||
biomes = {"swampland"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
decoration = "mcl_core:reeds",
|
||
height = 1,
|
||
height_max = 3,
|
||
spawn_by = { "mcl_core:water_source", "group:frosted_ice" },
|
||
num_spawn_by = 1,
|
||
})
|
||
|
||
-- Doubletall grass
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
schematic = {
|
||
size = { x=1, y=3, z=1 },
|
||
data = {
|
||
{ name = "air", prob = 0 },
|
||
{ name = "mcl_flowers:double_grass", param1=255, },
|
||
{ name = "mcl_flowers:double_grass_top", param1=255, },
|
||
},
|
||
},
|
||
replacements = {
|
||
["mcl_flowers:tallgrass"] = "mcl_flowers:double_grass"
|
||
},
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass_snow"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = -0.01,
|
||
scale = 0.03,
|
||
spread = {x = 300, y = 300, z = 300},
|
||
seed = 420,
|
||
octaves = 2,
|
||
persist = 0.6,
|
||
},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
biomes = {"plains", "sunflower_plains", "taiga", "forest", "flower_forest", "birch_forest", "birch_forest_m", "roofed_forest", "savanna", "savanna_m", "mesa_plateau_f_grasstop" },
|
||
})
|
||
|
||
-- Large ferns
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
schematic = {
|
||
size = { x=1, y=3, z=1 },
|
||
data = {
|
||
{ name = "air", prob = 0 },
|
||
{ name = "mcl_flowers:double_fern", param1=255, },
|
||
{ name = "mcl_flowers:double_fern_top", param1=255, },
|
||
},
|
||
},
|
||
replacements = {
|
||
["mcl_flowers:fern"] = "mcl_flowers:double_fern"
|
||
},
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:podzol", "mcl_core:podzol_snow"},
|
||
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0.01,
|
||
scale = 0.01,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 333,
|
||
octaves = 2,
|
||
persist = 0.66,
|
||
},
|
||
biomes = { "jungle", "jungle_edge", "jungle_edge_m", "taiga", "cold_taiga", "mega_taiga", "mega_spruce_taiga" },
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
})
|
||
|
||
-- Large flowers
|
||
local register_large_flower = function(name, biomes, seed, offset, flower_forest_offset)
|
||
local maxi
|
||
if flower_forest_offset then
|
||
maxi = 2
|
||
else
|
||
maxi = 1
|
||
end
|
||
for i=1, maxi do
|
||
local o, b -- offset, biomes
|
||
if i == 1 then
|
||
o = offset
|
||
b = biomes
|
||
else
|
||
o = flower_forest_offset
|
||
b = { "flower_forest" }
|
||
end
|
||
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
schematic = {
|
||
size = { x=1, y=3, z=1 },
|
||
data = {
|
||
{ name = "air", prob = 0 },
|
||
{ name = "mcl_flowers:"..name, param1=255, },
|
||
{ name = "mcl_flowers:"..name.."_top", param1=255, },
|
||
},
|
||
},
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = o,
|
||
scale = 0.01,
|
||
spread = {x = 300, y = 300, z = 300},
|
||
seed = seed,
|
||
octaves = 5,
|
||
persist = 0.62,
|
||
},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
flags = "",
|
||
biomes = b,
|
||
})
|
||
end
|
||
end
|
||
|
||
register_large_flower("rose_bush", {"forest"}, 9350, -0.008, 0.003)
|
||
register_large_flower("peony", {"forest"}, 10450, -0.008, 0.003)
|
||
register_large_flower("lilac", {"forest"}, 10600, -0.007, 0.003)
|
||
-- TODO
|
||
register_large_flower("sunflower", {"plains", "sunflower_plains"}, 2940, 0.0)
|
||
|
||
-- Jungle bush
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||
sidelen = 80,
|
||
noise_params = {
|
||
offset = 0.0196,
|
||
scale = 0.025,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 2930,
|
||
octaves = 4,
|
||
persist = 0.6,
|
||
},
|
||
biomes = {"jungle"},
|
||
y_min = 3,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_jungle_bush.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
})
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||
sidelen = 80,
|
||
noise_params = {
|
||
offset = 0.0085,
|
||
scale = 0.025,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 2930,
|
||
octaves = 4,
|
||
persist = 0.6,
|
||
},
|
||
biomes = {"jungle_edge", "jungle_edge_m"},
|
||
y_min = 3,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_jungle_bush.mts",
|
||
flags = "place_center_x, place_center_z",
|
||
})
|
||
|
||
-- Fallen logs
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:podzol", "mcl_core:coarse_dirt"},
|
||
sidelen = 80,
|
||
noise_params = {
|
||
offset = 0.00018,
|
||
scale = 0.00011,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 2,
|
||
octaves = 3,
|
||
persist = 0.66
|
||
},
|
||
biomes = {"mega_taiga", "mega_spruce_taiga", "taiga"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = {
|
||
size = {x = 4, y = 3, z = 1},
|
||
data = {
|
||
{name = "air", prob = 0},
|
||
{name = "air", prob = 0},
|
||
{name = "air", prob = 0},
|
||
{name = "air", prob = 0},
|
||
{name = "mcl_core:sprucetree", param2 = 12, prob = 127},
|
||
{name = "mcl_core:sprucetree", param2 = 12},
|
||
{name = "mcl_core:sprucetree", param2 = 12},
|
||
{name = "mcl_core:sprucetree", param2 = 12, prob = 127},
|
||
{name = "air", prob = 0},
|
||
{name = "mcl_mushrooms:mushroom_brown", prob = 160},
|
||
{name = "mcl_mushrooms:mushroom_red", prob = 160},
|
||
{name = "air", prob = 0},
|
||
},
|
||
},
|
||
flags = "place_center_x",
|
||
rotation = "random",
|
||
})
|
||
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol", "mcl_core:podzol_snow", "mcl_core:coarse_dirt"},
|
||
sidelen = 80,
|
||
noise_params = {
|
||
offset = 0.00018,
|
||
scale = 0.00011,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 2,
|
||
octaves = 3,
|
||
persist = 0.66
|
||
},
|
||
biomes = {"cold_taiga"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = {
|
||
size = {x = 4, y = 3, z = 1},
|
||
data = {
|
||
{name = "air", prob = 0},
|
||
{name = "air", prob = 0},
|
||
{name = "air", prob = 0},
|
||
{name = "air", prob = 0},
|
||
{name = "mcl_core:sprucetree", param2 = 12, prob = 127},
|
||
{name = "mcl_core:sprucetree", param2 = 12},
|
||
{name = "mcl_core:sprucetree", param2 = 12},
|
||
{name = "mcl_core:sprucetree", param2 = 12, prob = 127},
|
||
{name = "air", prob = 0},
|
||
{name = "air", prob = 0},
|
||
{name = "air", prob = 0},
|
||
{name = "air", prob = 0},
|
||
},
|
||
},
|
||
flags = "place_center_x",
|
||
rotation = "random",
|
||
})
|
||
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0.0,
|
||
scale = -0.00008,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 2,
|
||
octaves = 3,
|
||
persist = 0.66
|
||
},
|
||
biomes = {"forest", "birch_forest", "birch_forest_m",},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = {
|
||
size = {x = 3, y = 3, z = 1},
|
||
data = {
|
||
{name = "air", prob = 0},
|
||
{name = "air", prob = 0},
|
||
{name = "air", prob = 0},
|
||
{name = "mcl_core:birchtree", param2 = 12},
|
||
{name = "mcl_core:birchtree", param2 = 12},
|
||
{name = "mcl_core:birchtree", param2 = 12, prob = 127},
|
||
{name = "mcl_mushrooms:mushroom_red", prob = 100},
|
||
{name = "mcl_mushrooms:mushroom_brown", prob = 10},
|
||
{name = "air", prob = 0},
|
||
},
|
||
},
|
||
flags = "place_center_x",
|
||
rotation = "random",
|
||
})
|
||
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||
sidelen = 80,
|
||
fill_ratio = 0.005,
|
||
biomes = {"jungle"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = {
|
||
size = {x = 4, y = 3, z = 1},
|
||
data = {
|
||
{name = "air", prob = 0},
|
||
{name = "air", prob = 0},
|
||
{name = "air", prob = 0},
|
||
{name = "air", prob = 0},
|
||
{name = "mcl_core:jungletree", param2 = 12, prob = 127},
|
||
{name = "mcl_core:jungletree", param2 = 12},
|
||
{name = "mcl_core:jungletree", param2 = 12},
|
||
{name = "mcl_core:jungletree", param2 = 12, prob = 127},
|
||
{name = "air", prob = 0},
|
||
{name = "mcl_mushrooms:mushroom_brown", prob = 50},
|
||
{name = "air", prob = 0},
|
||
{name = "air", prob = 0},
|
||
},
|
||
},
|
||
flags = "place_center_x",
|
||
rotation = "random",
|
||
})
|
||
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0.00018,
|
||
scale = 0.00011,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 2,
|
||
octaves = 3,
|
||
persist = 0.66
|
||
},
|
||
biomes = {"forest"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = {
|
||
size = {x = 3, y = 3, z = 1},
|
||
data = {
|
||
{name = "air", prob = 0},
|
||
{name = "air", prob = 0},
|
||
{name = "air", prob = 0},
|
||
{name = "mcl_core:tree", param2 = 12, prob = 127},
|
||
{name = "mcl_core:tree", param2 = 12},
|
||
{name = "mcl_core:tree", param2 = 12},
|
||
{name = "air", prob = 0},
|
||
{name = "mcl_mushrooms:mushroom_brown", prob = 96},
|
||
{name = "mcl_mushrooms:mushroom_red", prob = 96},
|
||
},
|
||
},
|
||
flags = "place_center_x",
|
||
rotation = "random",
|
||
})
|
||
|
||
-- Lily pad
|
||
|
||
local lily_schem = {
|
||
{ name = "mcl_core:water_source" },
|
||
{ name = "mcl_flowers:waterlily" },
|
||
}
|
||
|
||
-- Spawn them in shallow water at ocean level in swamplands.
|
||
-- Tweak lilydepth to change the maximum water depth
|
||
local lilydepth = 2
|
||
|
||
for d=1, lilydepth do
|
||
local height = d + 2
|
||
local y = 1 - d
|
||
table.insert(lily_schem, 1, { name = "air", prob = 0 })
|
||
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
schematic = {
|
||
size = { x=1, y=height, z=1 },
|
||
data = lily_schem,
|
||
},
|
||
place_on = "mcl_core:dirt",
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0,
|
||
scale = 0.3,
|
||
spread = {x = 100, y = 100, z = 100},
|
||
seed = 503,
|
||
octaves = 6,
|
||
persist = 0.7,
|
||
},
|
||
y_min = y,
|
||
y_max = y,
|
||
biomes = { "swampland_shore" },
|
||
rotation = "random",
|
||
})
|
||
end
|
||
|
||
-- Melon
|
||
minetest.register_decoration({
|
||
deco_type = "simple",
|
||
place_on = {"mcl_core:dirt_with_grass"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = -0.01,
|
||
scale = 0.006,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 333,
|
||
octaves = 3,
|
||
persist = 0.6
|
||
},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
decoration = "mcl_farming:melon",
|
||
biomes = { "jungle" },
|
||
})
|
||
minetest.register_decoration({
|
||
deco_type = "simple",
|
||
place_on = {"mcl_core:dirt_with_grass"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = -0.005,
|
||
scale = 0.006,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = 333,
|
||
octaves = 3,
|
||
persist = 0.6
|
||
},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
decoration = "mcl_farming:melon",
|
||
biomes = { "jungle_edge" },
|
||
})
|
||
--[[
|
||
-- Lots of melons in Jungle Edge M
|
||
NOTE: Temporarily disabled because Jungle Edge M is too common atm.
|
||
TODO: Re-enable when Jungle Edge M has been fixed.
|
||
|
||
minetest.register_decoration({
|
||
deco_type = "simple",
|
||
place_on = {"mcl_core:dirt_with_grass"},
|
||
sidelen = 80,
|
||
noise_params = {
|
||
offset = 0.013,
|
||
scale = 0.006,
|
||
spread = {x = 125, y = 125, z = 125},
|
||
seed = 333,
|
||
octaves = 3,
|
||
persist = 0.6
|
||
},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
decoration = "mcl_farming:melon",
|
||
biomes = { "jungle_edge_m" },
|
||
})
|
||
]]
|
||
|
||
-- Pumpkin
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
schematic = {
|
||
size = { x=1, y=2, z=1 },
|
||
data = {
|
||
{ name = "air", prob = 0 },
|
||
{ name = "mcl_farming:pumpkin_face", param1=255, },
|
||
},
|
||
},
|
||
place_on = {"mcl_core:dirt_with_grass"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = -0.016,
|
||
scale = 0.01332,
|
||
spread = {x = 125, y = 125, z = 125},
|
||
seed = 666,
|
||
octaves = 6,
|
||
persist = 0.666
|
||
},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
rotation = "random",
|
||
})
|
||
|
||
-- Grasses and ferns
|
||
local grass_forest = {"plains", "taiga", "forest", "flower_forest", "birch_forest", "birch_forest_m", "roofed_forest", "swampland", "mesa_plateau_f_grasstop" }
|
||
local grass_plains = {"plains", "sunflower_plains", "jungle_edge", "jungle_edge_m" }
|
||
local grass_savanna = {"savanna", "savanna_m"}
|
||
local grass_sparse = {"extreme_hills", "extreme_hills_plus", "extreme_hills_plus_snowtop", "extreme_hills_m" }
|
||
|
||
register_grass_decoration("tallgrass", -0.03, 0.09, grass_forest)
|
||
register_grass_decoration("tallgrass", -0.015, 0.075, grass_forest)
|
||
register_grass_decoration("tallgrass", 0, 0.06, grass_forest)
|
||
register_grass_decoration("tallgrass", 0.015, 0.045, grass_forest)
|
||
register_grass_decoration("tallgrass", 0.03, 0.03, grass_forest)
|
||
register_grass_decoration("tallgrass", 0.01, 0.05, grass_forest)
|
||
register_grass_decoration("tallgrass", 0.03, 0.03, grass_plains)
|
||
register_grass_decoration("tallgrass", 0.05, 0.01, grass_plains)
|
||
register_grass_decoration("tallgrass", 0.07, -0.01, grass_plains)
|
||
register_grass_decoration("tallgrass", 0.09, -0.03, grass_plains)
|
||
register_grass_decoration("tallgrass", 0.18, -0.03, grass_savanna)
|
||
register_grass_decoration("tallgrass", 0.05, -0.03, grass_sparse)
|
||
|
||
local fern_minimal = { "jungle", "jungle_edge", "jungle_edge_m", "taiga", "mega_taiga", "mega_spruce_taiga", "cold_taiga" }
|
||
local fern_low = { "jungle", "jungle_edge", "jungle_edge_m", "taiga", "mega_taiga", "mega_spruce_taiga" }
|
||
local fern_jungle = { "jungle", "jungle_edge", "jungle_edge_m" }
|
||
register_grass_decoration("fern", -0.03, 0.09, fern_minimal)
|
||
register_grass_decoration("fern", -0.015, 0.075, fern_minimal)
|
||
register_grass_decoration("fern", 0, 0.06, fern_minimal)
|
||
register_grass_decoration("fern", 0.015, 0.045, fern_low)
|
||
register_grass_decoration("fern", 0.03, 0.03, fern_low)
|
||
register_grass_decoration("fern", 0.01, 0.05, fern_jungle)
|
||
register_grass_decoration("fern", 0.03, 0.03, fern_jungle)
|
||
register_grass_decoration("fern", 0.05, 0.01, fern_jungle)
|
||
register_grass_decoration("fern", 0.07, -0.01, fern_jungle)
|
||
register_grass_decoration("fern", 0.09, -0.03, fern_jungle)
|
||
|
||
-- Place tall grass on snow in Ice Plains and Extreme Hills+
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass_snow"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = -0.08,
|
||
scale = 0.09,
|
||
spread = {x = 15, y = 15, z = 15},
|
||
seed = 420,
|
||
octaves = 3,
|
||
persist = 0.6,
|
||
},
|
||
biomes = {"ice_plains"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = {
|
||
size = { x=1, y=2, z=1 },
|
||
data = {
|
||
{ name = "mcl_core:dirt_with_grass", force_place=true, },
|
||
{ name = "mcl_flowers:tallgrass", },
|
||
},
|
||
},
|
||
})
|
||
minetest.register_decoration({
|
||
deco_type = "schematic",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass_snow"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0.0,
|
||
scale = 0.09,
|
||
spread = {x = 15, y = 15, z = 15},
|
||
seed = 420,
|
||
octaves = 3,
|
||
persist = 0.6,
|
||
},
|
||
biomes = {"extreme_hills_plus_snowtop"},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
schematic = {
|
||
size = { x=1, y=2, z=1 },
|
||
data = {
|
||
{ name = "mcl_core:dirt_with_grass", force_place=true, },
|
||
{ name = "mcl_flowers:tallgrass", },
|
||
},
|
||
},
|
||
})
|
||
|
||
|
||
-- Dead bushes
|
||
minetest.register_decoration({
|
||
deco_type = "simple",
|
||
place_on = {"group:sand", "mcl_core:podzol", "mcl_core:podzol_snow", "mcl_core:dirt", "mcl_core:coarse_dirt", "group:hardened_clay"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0,
|
||
scale = 0.035,
|
||
spread = {x = 100, y = 100, z = 100},
|
||
seed = 1972,
|
||
octaves = 3,
|
||
persist = 0.6
|
||
},
|
||
y_min = 4,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
biomes = {"desert", "mesa", "mesa_sandlevel", "mesa_plateau_f", "mesa_plateau_f_sandlevel", "mesa_plateau_f_grasstop", "taiga", "mega_taiga"},
|
||
decoration = "mcl_core:deadbush",
|
||
height = 1,
|
||
})
|
||
|
||
-- Mushrooms in mushroom biome
|
||
minetest.register_decoration({
|
||
deco_type = "simple",
|
||
place_on = {"mcl_core:mycelium"},
|
||
sidelen = 80,
|
||
fill_ratio = 0.009,
|
||
biomes = {"mushroom_island", "mushroom_island_shore"},
|
||
noise_threshold = 2.0,
|
||
y_min = mcl_vars.mg_overworld_min,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
decoration = "mcl_mushrooms:mushroom_red",
|
||
})
|
||
minetest.register_decoration({
|
||
deco_type = "simple",
|
||
place_on = {"mcl_core:mycelium"},
|
||
sidelen = 80,
|
||
fill_ratio = 0.009,
|
||
biomes = {"mushroom_island", "mushroom_island_shore"},
|
||
y_min = mcl_vars.mg_overworld_min,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
decoration = "mcl_mushrooms:mushroom_brown",
|
||
})
|
||
|
||
-- Mushrooms in taigas
|
||
minetest.register_decoration({
|
||
deco_type = "simple",
|
||
place_on = {"mcl_core:podzol"},
|
||
sidelen = 80,
|
||
fill_ratio = 0.003,
|
||
biomes = {"taiga", "mega_taiga", "mega_spruce_taiga"},
|
||
y_min = mcl_vars.mg_overworld_min,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
decoration = "mcl_mushrooms:mushroom_red",
|
||
})
|
||
minetest.register_decoration({
|
||
deco_type = "simple",
|
||
place_on = {"mcl_core:podzol"},
|
||
sidelen = 80,
|
||
fill_ratio = 0.003,
|
||
biomes = {"taiga", "mega_taiga", "mega_spruce_taiga"},
|
||
y_min = mcl_vars.mg_overworld_min,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
decoration = "mcl_mushrooms:mushroom_brown",
|
||
})
|
||
|
||
|
||
-- Mushrooms next to trees
|
||
local mushrooms = {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown"}
|
||
local mseeds = { 7133, 8244 }
|
||
for m=1, #mushrooms do
|
||
-- Mushrooms next to trees
|
||
minetest.register_decoration({
|
||
deco_type = "simple",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:podzol", "mcl_core:mycelium", "mcl_core:stone", "mcl_core:andesite", "mcl_core:diorite", "mcl_core:granite"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0,
|
||
scale = 0.003,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = mseeds[m],
|
||
octaves = 3,
|
||
persist = 0.66,
|
||
},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
decoration = mushrooms[m],
|
||
spawn_by = { "mcl_core:tree", "mcl_core:sprucetree", "mcl_core:darktree", "mcl_core:birchtree" },
|
||
num_spawn_by = 1,
|
||
})
|
||
|
||
-- More mushrooms in swamplands
|
||
minetest.register_decoration({
|
||
deco_type = "simple",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:podzol", "mcl_core:mycelium", "mcl_core:stone", "mcl_core:andesite", "mcl_core:diorite", "mcl_core:granite"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0.05,
|
||
scale = 0.003,
|
||
spread = {x = 250, y = 250, z = 250},
|
||
seed = mseeds[m],
|
||
octaves = 3,
|
||
persist = 0.6,
|
||
},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
decoration = mushrooms[m],
|
||
biomes = { "swampland "},
|
||
spawn_by = { "mcl_core:tree", "mcl_core:sprucetree", "mcl_core:darktree", "mcl_core:birchtree" },
|
||
num_spawn_by = 1,
|
||
})
|
||
end
|
||
local function register_flower(name, biomes, seed, is_in_flower_forest)
|
||
if is_in_flower_forest == nil then
|
||
is_in_flower_forest = true
|
||
end
|
||
if biomes then
|
||
minetest.register_decoration({
|
||
deco_type = "simple",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||
sidelen = 16,
|
||
noise_params = {
|
||
offset = 0.0008,
|
||
scale = 0.006,
|
||
spread = {x = 100, y = 100, z = 100},
|
||
seed = seed,
|
||
octaves = 3,
|
||
persist = 0.6
|
||
},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
biomes = biomes,
|
||
decoration = "mcl_flowers:"..name,
|
||
})
|
||
end
|
||
if is_in_flower_forest then
|
||
minetest.register_decoration({
|
||
deco_type = "simple",
|
||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||
sidelen = 80,
|
||
noise_params= {
|
||
offset = 0.0008*40,
|
||
scale = 0.003,
|
||
spread = {x = 100, y = 100, z = 100},
|
||
seed = seed,
|
||
octaves = 3,
|
||
persist = 0.6,
|
||
},
|
||
y_min = 1,
|
||
y_max = mcl_vars.mg_overworld_max,
|
||
biomes = {"flower_forest"},
|
||
decoration = "mcl_flowers:"..name,
|
||
})
|
||
end
|
||
end
|
||
|
||
local flower_biomes1 = {"plains", "sunflower_plains", "roofed_forest", "forest", "birch_forest", "birch_forest_m", "taiga", "cold_taiga", "jungle", "jungle_edge", "jungle_edge_m", "savanna", "savanna_m", "extreme_hills", "extreme_hills_m", "extreme_hills_plus", "extreme_hills_plus_snowtop" }
|
||
|
||
register_flower("dandelion", flower_biomes1, 8)
|
||
register_flower("poppy", flower_biomes1, 9439)
|
||
|
||
local flower_biomes2 = {"plains", "sunflower_plains"}
|
||
register_flower("tulip_red", flower_biomes2, 436)
|
||
register_flower("tulip_orange", flower_biomes2, 536)
|
||
register_flower("tulip_pink", flower_biomes2, 636)
|
||
register_flower("tulip_white", flower_biomes2, 736)
|
||
register_flower("azure_bluet", flower_biomes2, 800)
|
||
register_flower("oxeye_daisy", flower_biomes2, 3490)
|
||
|
||
register_flower("allium", nil, 0) -- flower forest only
|
||
register_flower("blue_orchid", {"swampland"}, 64500, false)
|
||
|
||
end
|
||
|
||
-- Decorations in non-Overworld dimensions
|
||
local function register_dimension_decorations()
|
||
-- TODO
|
||
end
|
||
|
||
--
|
||
-- Detect mapgen to select functions
|
||
--
|
||
if mg_name ~= "singlenode" then
|
||
minetest.clear_registered_biomes()
|
||
minetest.clear_registered_decorations()
|
||
minetest.clear_registered_schematics()
|
||
if mg_name ~= "v6" and mg_name ~= "flat" then
|
||
register_biomes()
|
||
register_biomelike_ores()
|
||
register_decorations()
|
||
elseif mg_name == "flat" then
|
||
-- Implementation of Minecraft's Superflat mapgen, classic style
|
||
minetest.clear_registered_biomes()
|
||
minetest.clear_registered_decorations()
|
||
minetest.clear_registered_schematics()
|
||
register_classic_superflat_biome()
|
||
end
|
||
|
||
-- Non-overworld stuff is registered independently
|
||
register_dimension_biomes()
|
||
register_dimension_ores()
|
||
register_dimension_decorations()
|
||
|
||
-- Overworld decorations for v6 are handled in mcl_mapgen_core
|
||
end
|
||
|