From 9445b02dcc5cb46f9d5c9cf0bf57313f6a6d0cf1 Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 21 Dec 2022 20:57:34 -0500 Subject: [PATCH] MapGen update. Adjusted decorations. --- mods/MAPGEN/mcl_biomes/init.lua | 1592 ++++++++++++++++++------------- 1 file changed, 936 insertions(+), 656 deletions(-) diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index e39371651..d286fc5ec 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -126,6 +126,10 @@ local function register_biomes() "MesaPlateauF", "MesaPlateauFM", "MangroveSwamp", + "BambooJungle", + "BambooJungleM", + "BambooJungleEdge", + "BambooJungleEdgeM", } -- Ice Plains Spikes (rare) @@ -951,8 +955,6 @@ local function register_biomes() _mcl_palette_index = 20, }) - - -- Mesa Plateau F -- Identical to Mesa below Y=30. At Y=30 and above there is a "dry" oak forest minetest.register_biome({ @@ -1489,8 +1491,175 @@ local function register_biomes() _mcl_palette_index = 29, }) + -- Bamboo Jungle areas are like the Jungle areas, but warmer and more humid. + -- Bamboo Jungle + minetest.register_biome({ + name = "BambooJungle", + 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, + humidity_point = 90, + heat_point = 95, + _mcl_biome_type = "medium", + _mcl_palette_index = 24, + }) + minetest.register_biome({ + name = "BambooJungle_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 = -2, + y_max = 0, + humidity_point = 90, + heat_point = 95, + _mcl_biome_type = "medium", + _mcl_palette_index = 24, + }) + minetest.register_biome({ + name = "BambooJungle_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 = -3, + vertical_blend = 1, + humidity_point = 95, + heat_point = 90, + _mcl_biome_type = "medium", + _mcl_palette_index = 24, + }) + + -- Bamboo Jungle M + -- Like Bamboo Jungle but with even more dense vegetation + minetest.register_biome({ + name = "BambooJungleM", + 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, + humidity_point = 95, + heat_point = 95, + _mcl_biome_type = "medium", + _mcl_palette_index = 25, + }) + minetest.register_biome({ + name = "BambooJungleM_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 = -2, + y_max = 0, + humidity_point = 95, + heat_point = 90, + _mcl_biome_type = "medium", + _mcl_palette_index = 25, + }) + minetest.register_biome({ + name = "BambooJungleM_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 = -3, + vertical_blend = 1, + humidity_point = 95, + heat_point = 95, + _mcl_biome_type = "medium", + _mcl_palette_index = 25, + }) + + -- Bamboo Jungle Edge + minetest.register_biome({ + name = "BambooJungleEdge", + 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, + humidity_point = 92, + heat_point = 90, + _mcl_biome_type = "medium", + _mcl_palette_index = 26, + }) + minetest.register_biome({ + name = "BambooJungleEdge_ocean", + node_top = "mcl_core:sand", + depth_top = 1, + node_filler = "mcl_core:sand", + depth_filler = 2, + node_riverbed = "mcl_core:sand", + depth_riverbed = 2, + y_min = OCEAN_MIN, + y_max = 0, + humidity_point = 95, + heat_point = 88, + _mcl_biome_type = "medium", + _mcl_palette_index = 26, + }) + + -- Jungle Edge M (very rare). + -- Almost identical to Jungle Edge. Has deeper dirt. Melons spawn here a lot. + -- This biome occours directly between Jungle M and Jungle Edge but also has a small border to Jungle. + -- This biome is very small in general. + minetest.register_biome({ + name = "BambooJungleEdgeM", + 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, + humidity_point = 95, + heat_point = 95, + _mcl_biome_type = "medium", + _mcl_palette_index = 27, + }) + minetest.register_biome({ + name = "BambooJungleEdgeM_ocean", + node_top = "mcl_core:sand", + depth_top = 1, + node_filler = "mcl_core:sand", + depth_filler = 4, + node_riverbed = "mcl_core:sand", + depth_riverbed = 2, + y_min = OCEAN_MIN, + y_max = 0, + humidity_point = 97, + heat_point = 90, + _mcl_biome_type = "medium", + _mcl_palette_index = 27, + }) + + + -- Add deep ocean and underground biomes automatically. - for i=1, #overworld_biomes do + for i = 1, #overworld_biomes do local biome = overworld_biomes[i] -- Deep Ocean @@ -1500,11 +1669,11 @@ local function register_biomes() humidity_point = minetest.registered_biomes[biome].humidity_point, y_min = DEEP_OCEAN_MIN, y_max = DEEP_OCEAN_MAX, - node_top = minetest.registered_biomes[biome.."_ocean"].node_top, + node_top = minetest.registered_biomes[biome .. "_ocean"].node_top, depth_top = 2, - node_filler = minetest.registered_biomes[biome.."_ocean"].node_filler, + node_filler = minetest.registered_biomes[biome .. "_ocean"].node_filler, depth_filler = 3, - node_riverbed = minetest.registered_biomes[biome.."_ocean"].node_riverbed, + node_riverbed = minetest.registered_biomes[biome .. "_ocean"].node_riverbed, depth_riverbed = 2, vertical_blend = 5, _mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type, @@ -1559,7 +1728,6 @@ local function register_dimension_biomes() param2 = 0, }) - minetest.register_biome({ name = "Nether", node_filler = "mcl_nether:netherrack", @@ -1579,10 +1747,10 @@ local function register_dimension_biomes() minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_blackstone:nether_gold","mcl_nether:quartz_ore","mcl_core:gravel","mcl_nether:soul_sand","mcl_nether:glowstone","mcl_nether:magma"}, + place_on = {"mcl_nether:netherrack", "mcl_nether:glowstone", "mcl_blackstone:nether_gold", "mcl_nether:quartz_ore", "mcl_core:gravel", "mcl_nether:soul_sand", "mcl_nether:glowstone", "mcl_nether:magma"}, sidelen = 16, fill_ratio = 10, - biomes = { "Nether" }, + biomes = {"Nether"}, y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_nether_deco_max, decoration = "mcl_nether:netherrack", @@ -1607,10 +1775,10 @@ local function register_dimension_biomes() }) minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_nether:magma"}, + place_on = {"mcl_nether:netherrack", "mcl_nether:glowstone", "mcl_nether:magma"}, sidelen = 16, fill_ratio = 10, - biomes = { "SoulsandValley" }, + biomes = {"SoulsandValley"}, y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_nether_deco_max, decoration = "mcl_blackstone:soul_soil", @@ -1619,20 +1787,20 @@ local function register_dimension_biomes() }) minetest.register_ore({ - ore_type = "blob", - ore = "mcl_nether:soul_sand", - wherein = { "mcl_nether:netherrack", "mcl_blackstone:soul_soil" }, + ore_type = "blob", + ore = "mcl_nether:soul_sand", + wherein = {"mcl_nether:netherrack", "mcl_blackstone:soul_soil"}, clust_scarcity = 100, clust_num_ores = 225, - clust_size = 15, - biomes = { "SoulsandValley" }, + clust_size = 15, + biomes = {"SoulsandValley"}, y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_nether_deco_max, noise_params = { - offset = 0, - scale = 1, - spread = { x = 250, y = 250, z = 250 }, - seed = 12345, + offset = 0, + scale = 1, + spread = {x = 250, y = 250, z = 250}, + seed = 12345, octaves = 3, persist = 0.6, lacunarity = 2, @@ -1656,10 +1824,10 @@ local function register_dimension_biomes() }) minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_blackstone:nether_gold","mcl_nether:quartz_ore","mcl_core:gravel","mcl_nether:soul_sand","mcl_nether:magma","mcl_blackstone:blackstone"}, + place_on = {"mcl_nether:netherrack", "mcl_nether:glowstone", "mcl_blackstone:nether_gold", "mcl_nether:quartz_ore", "mcl_core:gravel", "mcl_nether:soul_sand", "mcl_nether:magma", "mcl_blackstone:blackstone"}, sidelen = 16, fill_ratio = 10, - biomes = { "CrimsonForest" }, + biomes = {"CrimsonForest"}, y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_nether_deco_max, decoration = "mcl_crimson:crimson_nylium", @@ -1683,10 +1851,10 @@ local function register_dimension_biomes() }) minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_blackstone:nether_gold","mcl_nether:quartz_ore","mcl_core:gravel","mcl_nether:soul_sand","mcl_nether:magma","mcl_blackstone:blackstone"}, + place_on = {"mcl_nether:netherrack", "mcl_nether:glowstone", "mcl_blackstone:nether_gold", "mcl_nether:quartz_ore", "mcl_core:gravel", "mcl_nether:soul_sand", "mcl_nether:magma", "mcl_blackstone:blackstone"}, sidelen = 16, fill_ratio = 10, - biomes = { "WarpedForest" }, + biomes = {"WarpedForest"}, y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_nether_deco_max, decoration = "mcl_crimson:warped_nylium", @@ -1711,10 +1879,10 @@ local function register_dimension_biomes() minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_blackstone:nether_gold","mcl_nether:quartz_ore","mcl_core:gravel","mcl_nether:soul_sand","mcl_blackstone:blackstone","mcl_nether:magma"}, + place_on = {"mcl_nether:netherrack", "mcl_nether:glowstone", "mcl_blackstone:nether_gold", "mcl_nether:quartz_ore", "mcl_core:gravel", "mcl_nether:soul_sand", "mcl_blackstone:blackstone", "mcl_nether:magma"}, sidelen = 16, fill_ratio = 10, - biomes = { "BasaltDelta" }, + biomes = {"BasaltDelta"}, y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_nether_deco_max, decoration = "mcl_blackstone:basalt", @@ -1723,25 +1891,25 @@ local function register_dimension_biomes() }) minetest.register_ore({ - ore_type = "blob", - ore = "mcl_blackstone:blackstone", - wherein = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_core:gravel"}, - clust_scarcity = 100, - clust_num_ores = 400, - clust_size = 20, - biomes = { "BasaltDelta" }, - y_min = mcl_vars.mg_lava_nether_max, - y_max = mcl_vars.mg_nether_deco_max, - noise_params = { - offset = 0, - scale = 1, - spread = { x = 250, y = 250, z = 250 }, - seed = 12345, - octaves = 3, - persist = 0.6, - lacunarity = 2, - flags = "defaults", - } + ore_type = "blob", + ore = "mcl_blackstone:blackstone", + wherein = {"mcl_nether:netherrack", "mcl_nether:glowstone", "mcl_core:gravel"}, + clust_scarcity = 100, + clust_num_ores = 400, + clust_size = 20, + biomes = {"BasaltDelta"}, + y_min = mcl_vars.mg_lava_nether_max, + y_max = mcl_vars.mg_nether_deco_max, + noise_params = { + offset = 0, + scale = 1, + spread = {x = 250, y = 250, z = 250}, + seed = 12345, + octaves = 3, + persist = 0.6, + lacunarity = 2, + flags = "defaults", + } }) --[[ THE END ]] @@ -1863,15 +2031,15 @@ local function register_biome_ores() -- Emeralds minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_core:stone_with_emerald", - wherein = stonelike, + ore_type = "scatter", + ore = "mcl_core:stone_with_emerald", + wherein = stonelike, clust_scarcity = 16384, clust_num_ores = 1, - clust_size = 1, - y_min = mcl_worlds.layer_to_y(4), - y_max = mcl_worlds.layer_to_y(32), - biomes = { + clust_size = 1, + y_min = mcl_worlds.layer_to_y(4), + y_max = mcl_worlds.layer_to_y(32), + biomes = { "ExtremeHills", "ExtremeHills_beach", "ExtremeHills_ocean", "ExtremeHills_deep_ocean", "ExtremeHills_underground", "ExtremeHills+", "ExtremeHills+_ocean", "ExtremeHills+_deep_ocean", "ExtremeHills+_underground", "ExtremeHillsM", "ExtremeHillsM_ocean", "ExtremeHillsM_deep_ocean", "ExtremeHillsM_underground", @@ -1887,15 +2055,15 @@ local function register_biome_ores() monster_egg_scarcity = 26 * 26 * 26 end minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_monster_eggs:monster_egg_stone", - wherein = "mcl_core:stone", + ore_type = "scatter", + ore = "mcl_monster_eggs:monster_egg_stone", + wherein = "mcl_core:stone", clust_scarcity = monster_egg_scarcity, clust_num_ores = 3, - clust_size = 2, - y_min = mcl_vars.mg_overworld_min, - y_max = mcl_worlds.layer_to_y(61), - biomes = { + clust_size = 2, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_worlds.layer_to_y(61), + biomes = { "ExtremeHills", "ExtremeHills_beach", "ExtremeHills_ocean", "ExtremeHills_deep_ocean", "ExtremeHills_underground", "ExtremeHills+", "ExtremeHills+_ocean", "ExtremeHills+_deep_ocean", "ExtremeHills+_underground", "ExtremeHillsM", "ExtremeHillsM_ocean", "ExtremeHillsM_deep_ocean", "ExtremeHillsM_underground", @@ -1905,51 +2073,51 @@ local function register_biome_ores() -- Bonus gold spawn in Mesa if mg_name ~= "v6" then minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_core:stone_with_gold", - wherein = stonelike, + ore_type = "scatter", + ore = "mcl_core:stone_with_gold", + wherein = stonelike, clust_scarcity = 3333, clust_num_ores = 5, - clust_size = 3, - y_min = mcl_worlds.layer_to_y(32), - y_max = mcl_worlds.layer_to_y(79), - biomes = { "Mesa", "Mesa_sandlevel", "Mesa_ocean", - "MesaBryce", "MesaBryce_sandlevel", "MesaBryce_ocean", - "MesaPlateauF", "MesaPlateauF_sandlevel", "MesaPlateauF_ocean", - "MesaPlateauFM", "MesaPlateauFM_sandlevel", "MesaPlateauFM_ocean", }, + clust_size = 3, + y_min = mcl_worlds.layer_to_y(32), + y_max = mcl_worlds.layer_to_y(79), + biomes = {"Mesa", "Mesa_sandlevel", "Mesa_ocean", + "MesaBryce", "MesaBryce_sandlevel", "MesaBryce_ocean", + "MesaPlateauF", "MesaPlateauF_sandlevel", "MesaPlateauF_ocean", + "MesaPlateauFM", "MesaPlateauFM_sandlevel", "MesaPlateauFM_ocean", }, }) end --nether gold if mg_name ~= "v6" then minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_blackstone:blackstone_gilded", - wherein = "mcl_blackstone:blackstone", + ore_type = "scatter", + ore = "mcl_blackstone:blackstone_gilded", + wherein = "mcl_blackstone:blackstone", clust_scarcity = 4775, clust_num_ores = 2, - clust_size = 2, - y_min = mcl_vars.mg_nether_min, - y_max = mcl_vars.mg_nether_max, + clust_size = 2, + y_min = mcl_vars.mg_nether_min, + y_max = mcl_vars.mg_nether_max, }) minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_blackstone:nether_gold", - wherein = "mcl_nether:netherrack", + ore_type = "scatter", + ore = "mcl_blackstone:nether_gold", + wherein = "mcl_nether:netherrack", clust_scarcity = 830, clust_num_ores = 5, - clust_size = 3, - y_min = mcl_vars.mg_nether_min, - y_max = mcl_vars.mg_nether_max, + 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_blackstone:nether_gold", - wherein = "mcl_nether:netherrack", + ore_type = "scatter", + ore = "mcl_blackstone:nether_gold", + wherein = "mcl_nether:netherrack", clust_scarcity = 1660, clust_num_ores = 4, - clust_size = 2, - y_min = mcl_vars.mg_nether_min, - y_max = mcl_vars.mg_nether_max, + clust_size = 2, + y_min = mcl_vars.mg_nether_min, + y_max = mcl_vars.mg_nether_max, }) end end @@ -1959,182 +2127,182 @@ 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, + 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 = { "MegaTaiga" }, + noise_params = {offset = 0, scale = 15, spread = {x = 130, y = 130, z = 130}, seed = 24, octaves = 3, persist = 0.70}, + biomes = {"MegaTaiga"}, }) minetest.register_ore({ - ore_type = "sheet", - ore = "mcl_core:coarse_dirt", - wherein = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, + 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, + 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 = { "MesaPlateauF_grasstop" }, + noise_params = {offset = 0, scale = 15, spread = {x = 250, y = 250, z = 250}, seed = 24, octaves = 3, persist = 0.70}, + biomes = {"MesaPlateauF_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, + 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, noise_params = { - offset = 0, - scale = 1, - spread = {x=250, y=250, z=250}, - seed = 12345, + offset = 0, + scale = 1, + spread = {x = 250, y = 250, z = 250}, + seed = 12345, octaves = 3, persist = 0.6, lacunarity = 2, flags = "defaults", }, - biomes = { "MesaPlateauF_grasstop" }, + biomes = {"MesaPlateauF_grasstop"}, }) minetest.register_ore({ - ore_type = "sheet", - ore = "mcl_core:coarse_dirt", - wherein = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, + 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, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, noise_threshold = -2.5, - noise_params = {offset=1, scale=15, spread={x=250, y=250, z=250}, seed=24, octaves=3, persist=0.80}, - biomes = { "MesaPlateauFM_grasstop" }, + noise_params = {offset = 1, scale = 15, spread = {x = 250, y = 250, z = 250}, seed = 24, octaves = 3, persist = 0.80}, + biomes = {"MesaPlateauFM_grasstop"}, }) minetest.register_ore({ - ore_type = "blob", - ore = "mcl_core:coarse_dirt", - wherein = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, - clust_scarcity = 1800, - clust_num_ores = 65, - clust_size = 15, - y_min = mcl_vars.mg_overworld_min, - y_max = mcl_vars.mg_overworld_max, + ore_type = "blob", + ore = "mcl_core:coarse_dirt", + wherein = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, + clust_scarcity = 1800, + clust_num_ores = 65, + clust_size = 15, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, noise_params = { - offset = 0, - scale = 1, - spread = {x=250, y=250, z=250}, - seed = 12345, + offset = 0, + scale = 1, + spread = {x = 250, y = 250, z = 250}, + seed = 12345, octaves = 3, persist = 0.6, lacunarity = 2, flags = "defaults", }, - biomes = { "MesaPlateauFM_grasstop" }, + biomes = {"MesaPlateauFM_grasstop"}, }) -- Occasionally dig out portions of MesaPlateauFM minetest.register_ore({ - ore_type = "blob", - ore = "air", - wherein = {"group:hardened_clay", "group:sand","mcl_core:coarse_dirt"}, - clust_scarcity = 4000, - clust_size = 5, - y_min = mcl_vars.mg_overworld_min, - y_max = mcl_vars.mg_overworld_max, + ore_type = "blob", + ore = "air", + wherein = {"group:hardened_clay", "group:sand", "mcl_core:coarse_dirt"}, + clust_scarcity = 4000, + clust_size = 5, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, noise_params = { - offset = 0, - scale = 1, - spread = {x=250, y=250, z=250}, - seed = 12345, + offset = 0, + scale = 1, + spread = {x = 250, y = 250, z = 250}, + seed = 12345, octaves = 3, persist = 0.6, lacunarity = 2, flags = "defaults", }, - biomes = { "MesaPlateauFM", "MesaPlateauFM_grasstop" }, + biomes = {"MesaPlateauFM", "MesaPlateauFM_grasstop"}, }) minetest.register_ore({ - ore_type = "blob", - ore = "mcl_core:redsandstone", - wherein = {"mcl_colorblocks:hardened_clay_orange"}, - clust_scarcity = 300, - clust_size = 8, - y_min = mcl_vars.mg_overworld_min, - y_max = mcl_vars.mg_overworld_max, + ore_type = "blob", + ore = "mcl_core:redsandstone", + wherein = {"mcl_colorblocks:hardened_clay_orange"}, + clust_scarcity = 300, + clust_size = 8, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, noise_params = { - offset = 0, - scale = 1, - spread = {x=250, y=250, z=250}, - seed = 12345, + offset = 0, + scale = 1, + spread = {x = 250, y = 250, z = 250}, + seed = 12345, octaves = 3, persist = 0.6, lacunarity = 2, flags = "defaults", }, - biomes = { "MesaPlateauFM_sandlevel" }, + biomes = {"MesaPlateauFM_sandlevel"}, }) -- More red sand in MesaPlateauFM minetest.register_ore({ - ore_type = "sheet", - ore = "mcl_core:redsand", - wherein = {"group:hardened_clay"}, - clust_scarcity = 1, - clust_num_ores = 12, - clust_size = 10, - y_min = mcl_vars.mg_overworld_min, - y_max = mcl_vars.mg_overworld_max, + ore_type = "sheet", + ore = "mcl_core:redsand", + wherein = {"group:hardened_clay"}, + 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.1, - noise_params = {offset=0, scale=15, spread={x=130, y=130, z=130}, seed=95, octaves=3, persist=0.70}, - biomes = { "MesaPlateauFM" }, + noise_params = {offset = 0, scale = 15, spread = {x = 130, y = 130, z = 130}, seed = 95, octaves = 3, persist = 0.70}, + biomes = {"MesaPlateauFM"}, }) minetest.register_ore({ - ore_type = "blob", - ore = "mcl_core:redsand", - wherein = {"group:hardened_clay"}, - clust_scarcity = 1500, - clust_size = 4, - y_min = mcl_vars.mg_overworld_min, - y_max = mcl_vars.mg_overworld_max, + ore_type = "blob", + ore = "mcl_core:redsand", + wherein = {"group:hardened_clay"}, + clust_scarcity = 1500, + clust_size = 4, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, noise_params = { - offset = 0, - scale = 1, - spread = {x=250, y=250, z=250}, - seed = 12345, + offset = 0, + scale = 1, + spread = {x = 250, y = 250, z = 250}, + seed = 12345, octaves = 3, persist = 0.6, lacunarity = 2, flags = "defaults", }, - biomes = { "MesaPlateauFM", "MesaPlateauFM_grasstop", "MesaPlateauFM_sandlevel" }, + biomes = {"MesaPlateauFM", "MesaPlateauFM_grasstop", "MesaPlateauFM_sandlevel"}, }) -- Small dirt patches in Extreme Hills M minetest.register_ore({ - ore_type = "blob", + 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, + 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 = { "ExtremeHillsM" }, + noise_params = {offset = 0, scale = 5, spread = {x = 250, y = 250, z = 250}, seed = 64, octaves = 3, persist = 0.60}, + biomes = {"ExtremeHillsM"}, }) -- For a transition from stone to hardened clay in mesa biomes that is not perfectly flat minetest.register_ore({ ore_type = "stratum", ore = "mcl_core:stone", wherein = {"group:hardened_clay"}, - noise_params = {offset=-6, scale=2, spread={x=25, y=25, z=25}, octaves=1, persist=0.60}, + noise_params = {offset = -6, scale = 2, spread = {x = 25, y = 25, z = 25}, octaves = 1, persist = 0.60}, stratum_thickness = 8, biomes = { "Mesa_sandlevel", "Mesa_ocean", @@ -2157,18 +2325,18 @@ local function register_biomelike_ores() if not seed then seed = 39 end - local y_max = y_min + height-1 + local y_max = y_min + height - 1 local perfect_biomes if is_perfect then -- "perfect" means no erosion - perfect_biomes = { "MesaBryce", "Mesa", "MesaPlateauF", "MesaPlateauFM" } + perfect_biomes = {"MesaBryce", "Mesa", "MesaPlateauF", "MesaPlateauFM"} else - perfect_biomes = { "MesaBryce" } + perfect_biomes = {"MesaBryce"} end -- Full, perfect stratum minetest.register_ore({ ore_type = "stratum", - ore = "mcl_colorblocks:hardened_clay_"..color, + ore = "mcl_colorblocks:hardened_clay_" .. color, -- Only paint uncolored so the biome can choose -- a color in advance. wherein = {"mcl_colorblocks:hardened_clay"}, @@ -2177,56 +2345,56 @@ local function register_biomelike_ores() biomes = perfect_biomes, }) if not is_perfect then - -- Slightly eroded stratum, only minor imperfections - minetest.register_ore({ - ore_type = "stratum", - ore = "mcl_colorblocks:hardened_clay_"..color, - wherein = {"mcl_colorblocks:hardened_clay"}, - y_min = y_min, - y_max = y_max, - biomes = { "Mesa", "MesaPlateauF" }, - noise_params = { - offset = y_min+(y_max-y_min)/2, - scale = 0, - spread = {x = 50, y = 50, z = 50}, - seed = seed+4, - octaves = 1, - persist = 1.0 - }, - np_stratum_thickness = { - offset = 1.28, - scale = 1, - spread = {x = 18, y = 18, z = 18}, - seed = seed+4, - octaves = 3, - persist = 0.8, - }, - }) - -- Very eroded stratum, most of the color is gone - minetest.register_ore({ - ore_type = "stratum", - ore = "mcl_colorblocks:hardened_clay_"..color, - wherein = {"mcl_colorblocks:hardened_clay"}, - y_min = y_min, - y_max = y_max, - biomes = { "MesaPlateauFM" }, - noise_params = { - offset = y_min+(y_max-y_min)/2, - scale = 0, - spread = {x = 50, y = 50, z = 50}, - seed = seed+4, - octaves = 1, - persist = 1.0 - }, - np_stratum_thickness = { - offset = 0.1, - scale = 1, - spread = {x = 28, y = 28, z = 28}, - seed = seed+4, - octaves = 2, - persist = 0.6, - }, - }) + -- Slightly eroded stratum, only minor imperfections + minetest.register_ore({ + ore_type = "stratum", + ore = "mcl_colorblocks:hardened_clay_" .. color, + wherein = {"mcl_colorblocks:hardened_clay"}, + y_min = y_min, + y_max = y_max, + biomes = {"Mesa", "MesaPlateauF"}, + noise_params = { + offset = y_min + (y_max - y_min) / 2, + scale = 0, + spread = {x = 50, y = 50, z = 50}, + seed = seed + 4, + octaves = 1, + persist = 1.0 + }, + np_stratum_thickness = { + offset = 1.28, + scale = 1, + spread = {x = 18, y = 18, z = 18}, + seed = seed + 4, + octaves = 3, + persist = 0.8, + }, + }) + -- Very eroded stratum, most of the color is gone + minetest.register_ore({ + ore_type = "stratum", + ore = "mcl_colorblocks:hardened_clay_" .. color, + wherein = {"mcl_colorblocks:hardened_clay"}, + y_min = y_min, + y_max = y_max, + biomes = {"MesaPlateauFM"}, + noise_params = { + offset = y_min + (y_max - y_min) / 2, + scale = 0, + spread = {x = 50, y = 50, z = 50}, + seed = seed + 4, + octaves = 1, + persist = 1.0 + }, + np_stratum_thickness = { + offset = 0.1, + scale = 1, + spread = {x = 28, y = 28, z = 28}, + seed = seed + 4, + octaves = 2, + persist = 0.6, + }, + }) end end @@ -2255,7 +2423,7 @@ local function register_biomelike_ores() suddenly don't match up anymore. ]] -- Available Mesa colors: - local mesa_stratum_colors = { "silver", "brown", "orange", "red", "yellow", "white" } + local mesa_stratum_colors = {"silver", "brown", "orange", "red", "yellow", "white"} -- Start level local y = 17 @@ -2315,17 +2483,17 @@ local function register_dimension_ores() -- Soul sand minetest.register_ore({ - ore_type = "sheet", - ore = "mcl_nether:soul_sand", + 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_worlds.layer_to_y(64, "nether"), + 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_worlds.layer_to_y(64, "nether"), noise_threshold = 0.0, - noise_params = { + noise_params = { offset = 0.5, scale = 0.1, spread = {x = 5, y = 5, z = 5}, @@ -2337,19 +2505,19 @@ local function register_dimension_ores() -- Magma blocks minetest.register_ore({ - ore_type = "blob", - ore = "mcl_nether:magma", - wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, - clust_scarcity = 8*8*8, + 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_worlds.layer_to_y(23, "nether"), - y_max = mcl_worlds.layer_to_y(37, "nether"), + clust_size = 6, + y_min = mcl_worlds.layer_to_y(23, "nether"), + y_max = mcl_worlds.layer_to_y(37, "nether"), noise_params = { - offset = 0, - scale = 1, - spread = {x=250, y=250, z=250}, - seed = 12345, + offset = 0, + scale = 1, + spread = {x = 250, y = 250, z = 250}, + seed = 12345, octaves = 3, persist = 0.6, lacunarity = 2, @@ -2357,19 +2525,19 @@ local function register_dimension_ores() }, }) minetest.register_ore({ - ore_type = "blob", - ore = "mcl_nether:magma", - wherein = {"mcl_nether:netherrack"}, - clust_scarcity = 10*10*10, + 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_worlds.layer_to_y(23, "nether"), - y_max = mcl_worlds.layer_to_y(37, "nether"), + clust_size = 8, + y_min = mcl_worlds.layer_to_y(23, "nether"), + y_max = mcl_worlds.layer_to_y(37, "nether"), noise_params = { - offset = 0, - scale = 1, - spread = {x=250, y=250, z=250}, - seed = 12345, + offset = 0, + scale = 1, + spread = {x = 250, y = 250, z = 250}, + seed = 12345, octaves = 3, persist = 0.6, lacunarity = 2, @@ -2379,15 +2547,15 @@ local function register_dimension_ores() -- 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 - 13, + 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 - 13, noise_threshold = 0.0, - noise_params = { + noise_params = { offset = 0.5, scale = 0.1, spread = {x = 5, y = 5, z = 5}, @@ -2399,17 +2567,17 @@ local function register_dimension_ores() -- Gravel (Nether) minetest.register_ore({ - ore_type = "sheet", - ore = "mcl_core:gravel", - wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, + 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_worlds.layer_to_y(63, "nether"), + y_min = mcl_worlds.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_worlds.layer_to_y(65+2, "nether"), + y_max = mcl_worlds.layer_to_y(65 + 2, "nether"), noise_threshold = 0.2, - noise_params = { + noise_params = { offset = 0.0, scale = 0.5, spread = {x = 20, y = 20, z = 20}, @@ -2422,22 +2590,22 @@ local function register_dimension_ores() -- Nether quartz if minetest.settings:get_bool("mcl_generate_ores", true) then minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_nether:quartz_ore", - wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, + 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, + 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"}, + 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, + clust_size = 4, y_min = mcl_vars.mg_nether_min, y_max = mcl_vars.mg_nether_max, }) @@ -2445,62 +2613,62 @@ local function register_dimension_ores() -- Lava springs in the Nether minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_nether:nether_lava_source", - wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, + ore_type = "scatter", + ore = "mcl_nether:nether_lava_source", + wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, clust_scarcity = 13500, --rare clust_num_ores = 1, - clust_size = 1, - y_min = mcl_vars.mg_lava_nether_max, - y_max = mcl_vars.mg_nether_max - 13, + clust_size = 1, + y_min = mcl_vars.mg_lava_nether_max, + y_max = mcl_vars.mg_nether_max - 13, }) - local lava_biomes = {"BasaltDelta","Nether"} + local lava_biomes = {"BasaltDelta", "Nether"} minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_nether:nether_lava_source", - wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, + 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, - biomes = lava_biomes, - y_min = mcl_vars.mg_nether_min, - y_max = mcl_vars.mg_lava_nether_max + 1, + clust_size = 1, + biomes = lava_biomes, + 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"}, + 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, - biomes = lava_biomes, - y_min = mcl_vars.mg_lava_nether_max + 2, - y_max = mcl_vars.mg_lava_nether_max + 12, + clust_size = 1, + biomes = lava_biomes, + 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"}, + 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, - biomes = lava_biomes, - y_min = mcl_vars.mg_lava_nether_max + 13, - y_max = mcl_vars.mg_lava_nether_max + 48, + clust_size = 1, + biomes = lava_biomes, + 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"}, + 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, - biomes = lava_biomes, - y_min = mcl_vars.mg_lava_nether_max + 49, - y_max = mcl_vars.mg_nether_max - 13, + clust_size = 1, + biomes = lava_biomes, + y_min = mcl_vars.mg_lava_nether_max + 49, + y_max = mcl_vars.mg_nether_max - 13, }) --[[ THE END ]] @@ -2519,20 +2687,20 @@ local function register_dimension_ores() local mult = 1.0 minetest.register_ore({ - ore_type = "stratum", - ore = "mcl_end:end_stone", - wherein = end_wherein, - biomes = {"EndSmallIslands","Endborder"}, - y_min = mcl_vars.mg_end_min+64, - y_max = mcl_vars.mg_end_min+80, - clust_num_ores = 3375, - clust_size = 15, + ore_type = "stratum", + ore = "mcl_end:end_stone", + wherein = end_wherein, + biomes = {"EndSmallIslands", "Endborder"}, + y_min = mcl_vars.mg_end_min + 64, + y_max = mcl_vars.mg_end_min + 80, + clust_num_ores = 3375, + clust_size = 15, noise_params = { - offset = mcl_vars.mg_end_min+70, - scale = -1, - spread = {x=84, y=84, z=84}, - seed = 145, + offset = mcl_vars.mg_end_min + 70, + scale = -1, + spread = {x = 84, y = 84, z = 84}, + seed = 145, octaves = 3, persist = 0.6, lacunarity = 2, @@ -2540,10 +2708,10 @@ local function register_dimension_ores() }, np_stratum_thickness = { - offset = 0, - scale = 15, - spread = {x=84, y=84, z=84}, - seed = 145, + offset = 0, + scale = 15, + spread = {x = 84, y = 84, z = 84}, + seed = 145, octaves = 3, persist = 0.6, lacunarity = 2, @@ -2553,27 +2721,27 @@ local function register_dimension_ores() }) minetest.register_ore({ - ore_type = "stratum", - ore = "mcl_end:end_stone", - wherein = end_wherein, - biomes = {"End","EndMidlands","EndHighlands","EndBarrens"}, - y_min = mcl_vars.mg_end_min+64, - y_max = mcl_vars.mg_end_min+80, + ore_type = "stratum", + ore = "mcl_end:end_stone", + wherein = end_wherein, + biomes = {"End", "EndMidlands", "EndHighlands", "EndBarrens"}, + y_min = mcl_vars.mg_end_min + 64, + y_max = mcl_vars.mg_end_min + 80, noise_params = { - offset = mcl_vars.mg_end_min+70, - scale = -1, - spread = {x=126, y=126, z=126}, - seed = mg_seed+9999, + offset = mcl_vars.mg_end_min + 70, + scale = -1, + spread = {x = 126, y = 126, z = 126}, + seed = mg_seed + 9999, octaves = 3, persist = 0.5, }, np_stratum_thickness = { - offset = -2, - scale = 10, - spread = {x=126, y=126, z=126}, - seed = mg_seed+9999, + offset = -2, + scale = 10, + spread = {x = 126, y = 126, z = 126}, + seed = mg_seed + 9999, octaves = 3, persist = 0.5, }, @@ -2581,54 +2749,54 @@ local function register_dimension_ores() }) minetest.register_ore({ - ore_type = "stratum", - ore = "mcl_end:end_stone", - wherein = end_wherein, - biomes = {"End","EndMidlands","EndHighlands","EndBarrens"}, - y_min = mcl_vars.mg_end_min+64, - y_max = mcl_vars.mg_end_min+80, + ore_type = "stratum", + ore = "mcl_end:end_stone", + wherein = end_wherein, + biomes = {"End", "EndMidlands", "EndHighlands", "EndBarrens"}, + y_min = mcl_vars.mg_end_min + 64, + y_max = mcl_vars.mg_end_min + 80, noise_params = { - offset = mcl_vars.mg_end_min+72, - scale = -3, - spread = {x=84, y=84, z=84}, - seed = mg_seed+999, + offset = mcl_vars.mg_end_min + 72, + scale = -3, + spread = {x = 84, y = 84, z = 84}, + seed = mg_seed + 999, octaves = 4, persist = 0.8, }, np_stratum_thickness = { - offset = -4, - scale = 10, - spread = {x=84, y=84, z=84}, - seed = mg_seed+999, + offset = -4, + scale = 10, + spread = {x = 84, y = 84, z = 84}, + seed = mg_seed + 999, octaves = 4, persist = 0.8, }, clust_scarcity = 1, }) minetest.register_ore({ - ore_type = "stratum", - ore = "mcl_end:end_stone", - wherein = end_wherein, - biomes = {"End","EndMidlands","EndHighlands","EndBarrens"}, - y_min = mcl_vars.mg_end_min+64, - y_max = mcl_vars.mg_end_min+80, + ore_type = "stratum", + ore = "mcl_end:end_stone", + wherein = end_wherein, + biomes = {"End", "EndMidlands", "EndHighlands", "EndBarrens"}, + y_min = mcl_vars.mg_end_min + 64, + y_max = mcl_vars.mg_end_min + 80, noise_params = { - offset = mcl_vars.mg_end_min+70, - scale = -2, - spread = {x=84, y=84, z=84}, - seed = mg_seed+99, + offset = mcl_vars.mg_end_min + 70, + scale = -2, + spread = {x = 84, y = 84, z = 84}, + seed = mg_seed + 99, octaves = 4, persist = 0.85, }, np_stratum_thickness = { - offset = -3, - scale = 5, - spread = {x=63, y=63, z=63}, - seed = mg_seed+50, + offset = -3, + scale = 5, + spread = {x = 63, y = 63, z = 63}, + seed = mg_seed + 50, octaves = 4, persist = 0.85, }, @@ -2645,11 +2813,11 @@ local function register_grass_decoration(grasstype, offset, scale, biomes) local place_on, seed, node if grasstype == "fern" then node = "mcl_flowers:fern" - place_on = {"group:grass_block_no_snow", "mcl_core:podzol","mcl_mud:mud"} + place_on = {"group:grass_block_no_snow", "mcl_core:podzol", "mcl_mud:mud"} seed = 333 elseif grasstype == "tallgrass" then node = "mcl_flowers:tallgrass" - place_on = {"group:grass_block_no_snow","mcl_mud:mud"} + place_on = {"group:grass_block_no_snow", "mcl_mud:mud"} seed = 420 end local noise = { @@ -2660,14 +2828,14 @@ local function register_grass_decoration(grasstype, offset, scale, biomes) octaves = 3, persist = 0.6 } - for b=1, #biomes do + for b = 1, #biomes do local param2 = minetest.registered_biomes[biomes[b]]._mcl_palette_index minetest.register_decoration({ deco_type = "simple", place_on = place_on, sidelen = 16, noise_params = noise, - biomes = { biomes[b] }, + biomes = {biomes[b]}, y_min = 1, y_max = mcl_vars.mg_overworld_max, decoration = node, @@ -2680,15 +2848,15 @@ local function register_seagrass_decoration(grasstype, offset, scale, biomes) local seed, nodes, surfaces, param2, param2_max, y_max if grasstype == "seagrass" then seed = 16 - surfaces = { "mcl_core:dirt", "mcl_core:sand", "mcl_core:gravel", "mcl_core:redsand" } - nodes = { "mcl_ocean:seagrass_dirt", "mcl_ocean:seagrass_sand", "mcl_ocean:seagrass_gravel", "mcl_ocean:seagrass_redsand" } + surfaces = {"mcl_core:dirt", "mcl_core:sand", "mcl_core:gravel", "mcl_core:redsand"} + nodes = {"mcl_ocean:seagrass_dirt", "mcl_ocean:seagrass_sand", "mcl_ocean:seagrass_gravel", "mcl_ocean:seagrass_redsand"} y_max = 0 elseif grasstype == "kelp" then seed = 32 param2 = 16 param2_max = 96 - surfaces = { "mcl_core:dirt", "mcl_core:sand", "mcl_core:gravel" } - nodes = { "mcl_ocean:kelp_dirt", "mcl_ocean:kelp_sand", "mcl_ocean:kelp_gravel" } + surfaces = {"mcl_core:dirt", "mcl_core:sand", "mcl_core:gravel"} + nodes = {"mcl_ocean:kelp_dirt", "mcl_ocean:kelp_sand", "mcl_ocean:kelp_gravel"} y_max = -6 end local noise = { @@ -2700,10 +2868,10 @@ local function register_seagrass_decoration(grasstype, offset, scale, biomes) persist = 0.6, } - for s=1, #surfaces do + for s = 1, #surfaces do minetest.register_decoration({ deco_type = "simple", - place_on = { surfaces[s] }, + place_on = {surfaces[s]}, sidelen = 16, noise_params = noise, biomes = biomes, @@ -2749,48 +2917,48 @@ local corals = { local function register_coral_decos(ck) local c = corals[ck] local noise = { - offset = -0.0085, - scale = 0.002, - spread = {x = 25, y = 120, z = 25}, - seed = 235, - octaves = 5, - persist = 1.8, - lacunarity = 3.5, - flags = "absvalue" - } + offset = -0.0085, + scale = 0.002, + spread = {x = 25, y = 120, z = 25}, + seed = 235, + octaves = 5, + persist = 1.8, + lacunarity = 3.5, + flags = "absvalue" + } minetest.register_decoration({ deco_type = "schematic", - place_on = {"group:sand","mcl_core:gravel","mcl_mud:mud"}, + place_on = {"group:sand", "mcl_core:gravel", "mcl_mud:mud"}, sidelen = 80, noise_params = noise, biomes = warm_oceans, y_min = coral_min, y_max = coral_max, - schematic = mod_mcl_structures.."/schematics/mcl_structures_coral_"..c.."_1.mts", + schematic = mod_mcl_structures .. "/schematics/mcl_structures_coral_" .. c .. "_1.mts", rotation = "random", flags = "all_floors,force_placement", }) minetest.register_decoration({ deco_type = "schematic", - place_on = {"group:sand","mcl_core:gravel","mcl_mud:mud"}, + place_on = {"group:sand", "mcl_core:gravel", "mcl_mud:mud"}, noise_params = noise, sidelen = 80, biomes = warm_oceans, y_min = coral_min, y_max = coral_max, - schematic = mod_mcl_structures.."/schematics/mcl_structures_coral_"..c.."_2.mts", + schematic = mod_mcl_structures .. "/schematics/mcl_structures_coral_" .. c .. "_2.mts", rotation = "random", flags = "all_floors,force_placement", }) minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_ocean:"..c.."_coral_block"}, + place_on = {"mcl_ocean:" .. c .. "_coral_block"}, sidelen = 16, fill_ratio = 3, y_min = coral_min, y_max = coral_max, - decoration = "mcl_ocean:"..c.."_coral", + decoration = "mcl_ocean:" .. c .. "_coral", biomes = warm_oceans, flags = "force_placement, all_floors", height = 1, @@ -2803,7 +2971,7 @@ local function register_coral_decos(ck) fill_ratio = 7, y_min = coral_min, y_max = coral_max, - decoration = "mcl_ocean:"..c.."_coral_fan", + decoration = "mcl_ocean:" .. c .. "_coral_fan", biomes = warm_oceans, flags = "force_placement, all_floors", height = 1, @@ -2813,12 +2981,12 @@ end local function register_decorations() -- Coral Reefs - for k,_ in pairs(corals) do + for k, _ in pairs(corals) do register_coral_decos(k) end minetest.register_decoration({ deco_type = "simple", - place_on = {"group:sand","mcl_core:gravel","mcl_mud:mud"}, + place_on = {"group:sand", "mcl_core:gravel", "mcl_mud:mud"}, sidelen = 16, noise_params = { offset = -0.0085, @@ -2899,20 +3067,20 @@ local function register_decorations() --rare CORAl minetest.register_decoration({ deco_type = "schematic", - place_on = {"group:sand","mcl_core:gravel"}, + place_on = {"group:sand", "mcl_core:gravel"}, fill_ratio = 0.0001, sidelen = 80, biomes = warm_oceans, y_min = coral_min, y_max = coral_max, - schematic = mod_mcl_structures.."/schematics/coral_cora.mts", + schematic = mod_mcl_structures .. "/schematics/coral_cora.mts", rotation = "random", flags = "place_center_x,place_center_z, force_placement", }) minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_core:dirt_with_grass","mcl_core:podzol"}, + place_on = {"mcl_core:dirt_with_grass", "mcl_core:podzol"}, sidelen = 16, noise_params = { offset = 0, @@ -2924,7 +3092,7 @@ local function register_decorations() lacunarity = 1.0, flags = "absvalue" }, - biomes = {"Taiga","ColdTaiga","MegaTaiga","MegaSpruceTaiga", "Forest"}, + biomes = {"Taiga", "ColdTaiga", "MegaTaiga", "MegaSpruceTaiga", "Forest"}, y_max = mcl_vars.mg_overworld_max, y_min = 2, decoration = "mcl_sweet_berry:sweet_berry_bush_3" @@ -2946,7 +3114,7 @@ local function register_decorations() biomes = {"IcePlainsSpikes"}, y_min = 4, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_structures.."/schematics/mcl_structures_ice_spike_large.mts", + schematic = mod_mcl_structures .. "/schematics/mcl_structures_ice_spike_large.mts", rotation = "random", flags = "place_center_x, place_center_z", }) @@ -2967,14 +3135,14 @@ local function register_decorations() biomes = {"IcePlainsSpikes"}, y_min = 4, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_structures.."/schematics/mcl_structures_ice_spike_small.mts", + schematic = mod_mcl_structures .. "/schematics/mcl_structures_ice_spike_small.mts", rotation = "random", flags = "place_center_x, place_center_z", }) -- Oak -- Large oaks - for i=1, 4 do + for i = 1, 4 do minetest.register_decoration({ deco_type = "schematic", place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, @@ -2990,7 +3158,7 @@ local function register_decorations() biomes = {"Forest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_large_"..i..".mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_large_" .. i .. ".mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3010,7 +3178,7 @@ local function register_decorations() biomes = {"ExtremeHills", "ExtremeHillsM", "ExtremeHills+", "ExtremeHills+_snowtop"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_large_"..i..".mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_large_" .. i .. ".mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3031,7 +3199,7 @@ local function register_decorations() biomes = {"Forest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3050,7 +3218,7 @@ local function register_decorations() biomes = {"FlowerForest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3069,7 +3237,7 @@ local function register_decorations() biomes = {"ExtremeHills", "ExtremeHillsM", "ExtremeHills+", "ExtremeHills+_snowtop"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3089,7 +3257,7 @@ local function register_decorations() biomes = {"ExtremeHills+", "ExtremeHills+_snowtop"}, y_min = 50, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3108,7 +3276,7 @@ local function register_decorations() biomes = {"MesaPlateauF_grasstop"}, y_min = 30, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3127,7 +3295,7 @@ local function register_decorations() biomes = {"MesaPlateauFM_grasstop"}, y_min = 30, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3147,7 +3315,7 @@ local function register_decorations() biomes = {"IcePlains"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3156,10 +3324,10 @@ local function register_decorations() place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, sidelen = 80, fill_ratio = 0.004, - biomes = {"Jungle", "JungleM"}, + biomes = {"Jungle", "JungleM","BambooJungle", "BambooJungleM"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3171,7 +3339,7 @@ local function register_decorations() biomes = {"JungleEdge", "JungleEdgeM", "Savanna"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3191,7 +3359,7 @@ local function register_decorations() biomes = {"FlowerForest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic_bee_nest.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic_bee_nest.mts", flags = "place_center_x, place_center_z", rotation = "random", spawn_by = "group:flower", @@ -3212,7 +3380,7 @@ local function register_decorations() biomes = {"Forest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic_bee_nest.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic_bee_nest.mts", flags = "place_center_x, place_center_z", rotation = "random", spawn_by = "group:flower", @@ -3234,7 +3402,7 @@ local function register_decorations() biomes = {"Forest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_balloon.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_balloon.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3255,7 +3423,7 @@ local function register_decorations() biomes = {"Swampland", "Swampland_shore"}, y_min = 0, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_swamp.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_swamp.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3266,10 +3434,10 @@ local function register_decorations() place_on = {"mcl_mud:mud"}, sidelen = 80, fill_ratio = 0.0065, - biomes = {"MangroveSwamp","MangroveSwamp_shore"}, + biomes = {"MangroveSwamp", "MangroveSwamp_shore"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mangrove.."/schematics/mcl_mangrove_tree_1.mts", + schematic = mod_mcl_mangrove .. "/schematics/mcl_mangrove_tree_1.mts", flags = "place_center_x, place_center_z, force_placement", rotation = "random", }) @@ -3279,10 +3447,10 @@ local function register_decorations() place_on = {"mcl_mud:mud"}, sidelen = 80, fill_ratio = 0.0045, - biomes = {"MangroveSwamp","MangroveSwamp_shore"}, + biomes = {"MangroveSwamp", "MangroveSwamp_shore"}, y_min = -1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mangrove.."/schematics/mcl_mangrove_tree_2.mts", + schematic = mod_mcl_mangrove .. "/schematics/mcl_mangrove_tree_2.mts", flags = "place_center_x, place_center_z, force_placement", rotation = "random", }) @@ -3292,10 +3460,10 @@ local function register_decorations() place_on = {"mcl_mud:mud"}, sidelen = 80, fill_ratio = 0.023, - biomes = {"MangroveSwamp","MangroveSwamp_shore"}, + biomes = {"MangroveSwamp", "MangroveSwamp_shore"}, y_min = -1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mangrove.."/schematics/mcl_mangrove_tree_3.mts", + schematic = mod_mcl_mangrove .. "/schematics/mcl_mangrove_tree_3.mts", flags = "place_center_x, place_center_z, force_placement", rotation = "random", }) @@ -3305,10 +3473,10 @@ local function register_decorations() place_on = {"mcl_mud:mud"}, sidelen = 80, fill_ratio = 0.023, - biomes = {"MangroveSwamp","MangroveSwamp_shore"}, + biomes = {"MangroveSwamp", "MangroveSwamp_shore"}, y_min = -1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mangrove.."/schematics/mcl_mangrove_tree_4.mts", + schematic = mod_mcl_mangrove .. "/schematics/mcl_mangrove_tree_4.mts", flags = "place_center_x, place_center_z, force_placement", rotation = "random", }) @@ -3318,10 +3486,10 @@ local function register_decorations() place_on = {"mcl_mud:mud"}, sidelen = 80, fill_ratio = 0.023, - biomes = {"MangroveSwamp","MangroveSwamp_shore"}, + biomes = {"MangroveSwamp", "MangroveSwamp_shore"}, y_min = -1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mangrove.."/schematics/mcl_mangrove_tree_5.mts", + schematic = mod_mcl_mangrove .. "/schematics/mcl_mangrove_tree_5.mts", flags = "place_center_x, place_center_z, force_placement", rotation = "random", }) @@ -3341,7 +3509,7 @@ local function register_decorations() biomes = {"MangroveSwamp"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mangrove.."/schematics/mcl_mangrove_bee_nest.mts", + schematic = mod_mcl_mangrove .. "/schematics/mcl_mangrove_bee_nest.mts", flags = "place_center_x, place_center_z, force_placement", rotation = "random", spawn_by = "group:flower", @@ -3351,7 +3519,7 @@ local function register_decorations() place_on = {"mcl_mud:mud"}, sidelen = 80, fill_ratio = 0.045, - biomes = {"MangroveSwamp","MangroveSwamp_shore"}, + biomes = {"MangroveSwamp", "MangroveSwamp_shore"}, y_min = 0, y_max = 0, decoration = "mcl_mangrove:water_logged_roots", @@ -3365,7 +3533,7 @@ local function register_decorations() num_spawn_by = 2, sidelen = 80, fill_ratio = 10, - biomes = {"MangroveSwamp","MangroveSwamp_shore"}, + biomes = {"MangroveSwamp", "MangroveSwamp_shore"}, y_min = 0, y_max = 0, decoration = "mcl_mangrove:water_logged_roots", @@ -3376,7 +3544,7 @@ local function register_decorations() place_on = {"mcl_mud:mud"}, sidelen = 80, fill_ratio = 0.045, - biomes = {"MangroveSwamp","MangroveSwamp_shore"}, + biomes = {"MangroveSwamp", "MangroveSwamp_shore"}, place_offset_y = -1, decoration = "mcl_mangrove:mangrove_mud_roots", flags = "place_center_x, place_center_z, force_placement", @@ -3386,7 +3554,7 @@ local function register_decorations() place_on = {"mcl_mud:mud"}, sidelen = 80, fill_ratio = 0.008, - biomes = {"MangroveSwamp","MangroveSwamp_shore"}, + biomes = {"MangroveSwamp", "MangroveSwamp_shore"}, decoration = "mcl_core:deadbush", flags = "place_center_x, place_center_z", }) @@ -3395,7 +3563,7 @@ local function register_decorations() place_on = {"mcl_core:water_source"}, sidelen = 80, fill_ratio = 0.035, - biomes = {"MangroveSwamp","MangroveSwamp_shore"}, + biomes = {"MangroveSwamp", "MangroveSwamp_shore"}, decoration = "mcl_flowers:waterlily", flags = "place_center_x, place_center_z, liquid_surface", }) @@ -3403,7 +3571,7 @@ local function register_decorations() -- Jungle tree -- Huge jungle tree (4 variants) - for i=1, 4 do + for i = 1, 4 do minetest.register_decoration({ deco_type = "schematic", place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, @@ -3412,7 +3580,7 @@ local function register_decorations() biomes = {"Jungle"}, y_min = 4, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_tree_huge_"..i..".mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_tree_huge_" .. i .. ".mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3424,7 +3592,7 @@ local function register_decorations() biomes = {"JungleM"}, y_min = 4, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_tree_huge_"..i..".mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_tree_huge_" .. i .. ".mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3439,7 +3607,7 @@ local function register_decorations() biomes = {"Jungle"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_tree.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_tree.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3451,7 +3619,7 @@ local function register_decorations() biomes = {"Jungle"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_tree_2.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_tree_2.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3463,7 +3631,7 @@ local function register_decorations() biomes = {"Jungle"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_tree_3.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_tree_3.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3475,7 +3643,7 @@ local function register_decorations() biomes = {"Jungle"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_tree_4.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_tree_4.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3484,10 +3652,10 @@ local function register_decorations() place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, sidelen = 80, fill_ratio = 0.025, - biomes = {"Jungle"}, + biomes = {"Jungle","BambooJungle"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_tree.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_tree.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3496,10 +3664,10 @@ local function register_decorations() place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, sidelen = 80, fill_ratio = 0.0045, - biomes = {"JungleEdge", "JungleEdgeM"}, + biomes = {"JungleEdge", "JungleEdgeM", "BambooJungleEdge", "BambooJungleEdgeM"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_tree.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_tree.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3509,10 +3677,10 @@ local function register_decorations() place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, sidelen = 80, fill_ratio = 0.09, - biomes = {"JungleM"}, + biomes = {"JungleM", "BambooJungleM"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_tree_2.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_tree_2.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3536,7 +3704,7 @@ local function register_decorations() biomes = biomes, y_min = y, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/"..sprucename, + schematic = mod_mcl_core .. "/schematics/" .. sprucename, flags = "place_center_x, place_center_z", }) end @@ -3590,7 +3758,7 @@ local function register_decorations() biomes = {"Taiga", "ColdTaiga"}, y_min = 2, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_spruce_lollipop.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_spruce_lollipop.mts", flags = "place_center_x, place_center_z", }) @@ -3610,7 +3778,7 @@ local function register_decorations() biomes = {"Taiga", "ColdTaiga"}, y_min = 3, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_spruce_matchstick.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_spruce_matchstick.mts", flags = "place_center_x, place_center_z", }) @@ -3630,12 +3798,12 @@ local function register_decorations() biomes = {"IcePlains"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_spruce_5.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_spruce_5.mts", flags = "place_center_x, place_center_z", }) -- Acacia (many variants) - for a=1, 7 do + for a = 1, 7 do minetest.register_decoration({ deco_type = "schematic", place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:coarse_dirt"}, @@ -3644,7 +3812,7 @@ local function register_decorations() biomes = {"Savanna", "SavannaM"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_acacia_"..a..".mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_acacia_" .. a .. ".mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3666,7 +3834,7 @@ local function register_decorations() biomes = {"BirchForest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_birch.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_birch.mts", flags = "place_center_x, place_center_z", }) minetest.register_decoration({ @@ -3684,7 +3852,7 @@ local function register_decorations() biomes = {"BirchForestM"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_birch_tall.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_birch_tall.mts", flags = "place_center_x, place_center_z", }) @@ -3703,7 +3871,7 @@ local function register_decorations() biomes = {"Forest", "FlowerForest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_birch.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_birch.mts", flags = "place_center_x, place_center_z", }) minetest.register_decoration({ @@ -3722,7 +3890,7 @@ local function register_decorations() biomes = {"Forest", "BirchForest", "BirchForestM"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_birch_bee_nest.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_birch_bee_nest.mts", flags = "place_center_x, place_center_z", rotation = "random", spawn_by = "group:flower", @@ -3744,66 +3912,65 @@ local function register_decorations() biomes = {"RoofedForest"}, y_min = 4, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_dark_oak.mts", + schematic = mod_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_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) + 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 = { "group:grass_block_no_snow", "mcl_core:dirt" }, + place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, sidelen = 80, fill_ratio = ratio_mushroom_huge, - biomes = { "RoofedForest" }, + biomes = {"RoofedForest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mushrooms.."/schematics/mcl_mushrooms_huge_brown.mts", + schematic = mod_mcl_mushrooms .. "/schematics/mcl_mushrooms_huge_brown.mts", flags = "place_center_x, place_center_z", rotation = "0", }) minetest.register_decoration({ deco_type = "schematic", - place_on = { "group:grass_block_no_snow", "mcl_core:dirt" }, + place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, sidelen = 80, fill_ratio = ratio_mushroom_giant, - biomes = { "RoofedForest" }, + biomes = {"RoofedForest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mushrooms.."/schematics/mcl_mushrooms_giant_brown.mts", + schematic = mod_mcl_mushrooms .. "/schematics/mcl_mushrooms_giant_brown.mts", flags = "place_center_x, place_center_z", rotation = "0", }) minetest.register_decoration({ deco_type = "schematic", - place_on = { "mcl_core:mycelium" }, + place_on = {"mcl_core:mycelium"}, sidelen = 80, fill_ratio = ratio_mushroom_mycelium_huge, - biomes = { "MushroomIsland", "MushroomIslandShore" }, + biomes = {"MushroomIsland", "MushroomIslandShore"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mushrooms.."/schematics/mcl_mushrooms_huge_brown.mts", + schematic = mod_mcl_mushrooms .. "/schematics/mcl_mushrooms_huge_brown.mts", flags = "place_center_x, place_center_z", rotation = "0", }) minetest.register_decoration({ deco_type = "schematic", - place_on = { "mcl_core:mycelium" }, + place_on = {"mcl_core:mycelium"}, sidelen = 80, fill_ratio = ratio_mushroom_mycelium_giant, - biomes = { "MushroomIsland", "MushroomIslandShore" }, + biomes = {"MushroomIsland", "MushroomIslandShore"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mushrooms.."/schematics/mcl_mushrooms_giant_brown.mts", + schematic = mod_mcl_mushrooms .. "/schematics/mcl_mushrooms_giant_brown.mts", flags = "place_center_x, place_center_z", rotation = "0", }) @@ -3811,50 +3978,50 @@ local function register_decorations() -- Huge Red Mushroom minetest.register_decoration({ deco_type = "schematic", - place_on = { "group:grass_block_no_snow", "mcl_core:dirt" }, + place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, sidelen = 80, fill_ratio = ratio_mushroom_huge, - biomes = { "RoofedForest" }, + biomes = {"RoofedForest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mushrooms.."/schematics/mcl_mushrooms_huge_red.mts", + schematic = mod_mcl_mushrooms .. "/schematics/mcl_mushrooms_huge_red.mts", flags = "place_center_x, place_center_z", rotation = "0", }) minetest.register_decoration({ deco_type = "schematic", - place_on = { "group:grass_block_no_snow", "mcl_core:dirt" }, + place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, sidelen = 80, fill_ratio = ratio_mushroom_giant, - biomes = { "RoofedForest" }, + biomes = {"RoofedForest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mushrooms.."/schematics/mcl_mushrooms_giant_red.mts", + schematic = mod_mcl_mushrooms .. "/schematics/mcl_mushrooms_giant_red.mts", flags = "place_center_x, place_center_z", rotation = "0", }) minetest.register_decoration({ deco_type = "schematic", - place_on = { "mcl_core:mycelium" }, + place_on = {"mcl_core:mycelium"}, sidelen = 80, fill_ratio = ratio_mushroom_mycelium_huge, - biomes = { "MushroomIsland", "MushroomIslandShore" }, + biomes = {"MushroomIsland", "MushroomIslandShore"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mushrooms.."/schematics/mcl_mushrooms_huge_red.mts", + schematic = mod_mcl_mushrooms .. "/schematics/mcl_mushrooms_huge_red.mts", flags = "place_center_x, place_center_z", rotation = "0", }) minetest.register_decoration({ deco_type = "schematic", - place_on = { "mcl_core:mycelium" }, + place_on = {"mcl_core:mycelium"}, sidelen = 80, fill_ratio = ratio_mushroom_mycelium_giant, - biomes = { "MushroomIsland", "MushroomIslandShore" }, + biomes = {"MushroomIsland", "MushroomIslandShore"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mushrooms.."/schematics/mcl_mushrooms_giant_red.mts", + schematic = mod_mcl_mushrooms .. "/schematics/mcl_mushrooms_giant_red.mts", flags = "place_center_x, place_center_z", rotation = "0", }) @@ -3910,7 +4077,7 @@ local function register_decorations() biomes = {"MegaTaiga", "MegaSpruceTaiga"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_structures.."/schematics/mcl_structures_boulder.mts", + schematic = mod_mcl_structures .. "/schematics/mcl_structures_boulder.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3931,7 +4098,7 @@ local function register_decorations() biomes = {"MegaTaiga", "MegaSpruceTaiga"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_structures.."/schematics/mcl_structures_boulder_small.mts", + schematic = mod_mcl_structures .. "/schematics/mcl_structures_boulder_small.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3953,9 +4120,9 @@ local function register_decorations() y_max = mcl_vars.mg_overworld_max, decoration = "mcl_core:cactus", biomes = {"Desert", - "Mesa","Mesa_sandlevel", - "MesaPlateauF","MesaPlateauF_sandlevel", - "MesaPlateauFM","MesaPlateauFM_sandlevel"}, + "Mesa", "Mesa_sandlevel", + "MesaPlateauF", "MesaPlateauF_sandlevel", + "MesaPlateauFM", "MesaPlateauFM_sandlevel"}, height = 1, height_max = 3, }) @@ -3978,7 +4145,7 @@ local function register_decorations() decoration = "mcl_core:reeds", height = 1, height_max = 3, - spawn_by = { "mcl_core:water_source", "group:frosted_ice" }, + spawn_by = {"mcl_core:water_source", "group:frosted_ice"}, num_spawn_by = 1, }) minetest.register_decoration({ @@ -3999,23 +4166,23 @@ local function register_decorations() decoration = "mcl_core:reeds", height = 1, height_max = 3, - spawn_by = { "mcl_core:water_source", "group:frosted_ice" }, + spawn_by = {"mcl_core:water_source", "group:frosted_ice"}, num_spawn_by = 1, }) -- Doubletall grass local function register_doubletall_grass(offset, scale, biomes) - for b=1, #biomes do + for b = 1, #biomes do local param2 = minetest.registered_biomes[biomes[b]]._mcl_palette_index minetest.register_decoration({ deco_type = "schematic", schematic = { - size = { x=1, y=3, z=1 }, + size = {x = 1, y = 3, z = 1}, data = { - { name = "air", prob = 0 }, - { name = "mcl_flowers:double_grass", param1=255, param2=param2 }, - { name = "mcl_flowers:double_grass_top", param1=255, param2=param2 }, + {name = "air", prob = 0}, + {name = "mcl_flowers:double_grass", param1 = 255, param2 = param2}, + {name = "mcl_flowers:double_grass_top", param1 = 255, param2 = param2}, }, }, place_on = {"group:grass_block_no_snow"}, @@ -4030,7 +4197,7 @@ local function register_decorations() }, y_min = 1, y_max = mcl_vars.mg_overworld_max, - biomes = { biomes[b] }, + biomes = {biomes[b]}, }) end end @@ -4041,16 +4208,16 @@ local function register_decorations() -- Large ferns local function register_double_fern(offset, scale, biomes) - for b=1, #biomes do + for b = 1, #biomes do local param2 = minetest.registered_biomes[biomes[b]]._mcl_palette_index minetest.register_decoration({ deco_type = "schematic", schematic = { - size = { x=1, y=3, z=1 }, + size = {x = 1, y = 3, z = 1}, data = { - { name = "air", prob = 0 }, - { name = "mcl_flowers:double_fern", param1=255, param2=param2 }, - { name = "mcl_flowers:double_fern_top", param1=255, param2=param2 }, + {name = "air", prob = 0}, + {name = "mcl_flowers:double_fern", param1 = 255, param2 = param2}, + {name = "mcl_flowers:double_fern_top", param1 = 255, param2 = param2}, }, }, place_on = {"group:grass_block_no_snow", "mcl_core:podzol"}, @@ -4070,8 +4237,8 @@ local function register_decorations() end end - register_double_fern(0.01, 0.03, { "Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "ColdTaiga", "MegaTaiga", "MegaSpruceTaiga" }) - register_double_fern(0.15, 0.1, { "JungleM" }) + register_double_fern(0.01, 0.03, {"Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "ColdTaiga", "MegaTaiga", "MegaSpruceTaiga", "BambooJungle", "BambooJungleM", "BambooJungleEdge", "BambooJungleEdgeM",}) + register_double_fern(0.15, 0.1, {"JungleM"}) -- Large flowers local function register_large_flower(name, biomes, seed, offset, flower_forest_offset) @@ -4081,24 +4248,24 @@ local function register_decorations() else maxi = 1 end - for i=1, maxi do + for i = 1, maxi do local o, b -- offset, biomes if i == 1 then o = offset b = biomes else o = flower_forest_offset - b = { "FlowerForest" } + b = {"FlowerForest"} end minetest.register_decoration({ deco_type = "schematic", schematic = { - size = { x=1, y=3, z=1 }, + 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, }, + {name = "air", prob = 0}, + {name = "mcl_flowers:" .. name, param1 = 255, }, + {name = "mcl_flowers:" .. name .. "_top", param1 = 255, }, }, }, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, @@ -4142,7 +4309,7 @@ local function register_decorations() biomes = {"Jungle"}, y_min = 3, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_bush_oak_leaves.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_bush_oak_leaves.mts", flags = "place_center_x, place_center_z", }) minetest.register_decoration({ @@ -4157,10 +4324,10 @@ local function register_decorations() octaves = 4, persist = 0.6, }, - biomes = {"Jungle"}, + biomes = {"Jungle", "BambooJungle"}, y_min = 3, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_bush_oak_leaves_2.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_bush_oak_leaves_2.mts", flags = "place_center_x, place_center_z", }) minetest.register_decoration({ @@ -4175,10 +4342,10 @@ local function register_decorations() octaves = 4, persist = 0.6, }, - biomes = {"JungleM"}, + biomes = {"JungleM","BambooJungleM"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_bush_oak_leaves.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_bush_oak_leaves.mts", flags = "place_center_x, place_center_z", }) minetest.register_decoration({ @@ -4193,13 +4360,121 @@ local function register_decorations() octaves = 4, persist = 0.6, }, - biomes = {"JungleEdge", "JungleEdgeM"}, + biomes = {"JungleEdge", "JungleEdgeM","BambooJungleEdge", "BambooJungleEdgeM"}, y_min = 3, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_bush_oak_leaves.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_bush_oak_leaves.mts", flags = "place_center_x, place_center_z", }) + -- Bamboo + minetest.register_decoration({ + deco_type = "simple", + place_on = {"group:grass_block_no_snow", "mcl_core:dirt",}, + sidelen = 80, + fill_ratio = 0.0043, + biomes = {"Jungle", "JungleM", "JungleEdge", "JungleEdgeM"}, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + decoration = "mcl_bamboo:bamboo", + height = 12, + max_height = 15, + flags = "place_center_x, place_center_z", + rotation = "random", + }) + + minetest.register_decoration({ + deco_type = "simple", + place_on = {"group:grass_block_no_snow", "mcl_core:dirt", "mcl_core:podzol"}, + sidelen = 80, + fill_ratio = 0.095, + biomes = {"BambooJungle", "BambooJungleM", "BambooJungleEdge", "BambooJungleEdgeM"}, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + decoration = "mcl_bamboo:bamboo", + height = 12, + max_height = 15, + flags = "place_center_x, place_center_z", + rotation = "random", + }) + + minetest.register_decoration({ + deco_type = "simple", + place_on = {"mcl_bamboo:bamboo"}, + sidelen = 80, + fill_ratio = 1, + biomes = {"BambooJungle", "BambooJungleM", "BambooJungleEdge", "BambooJungleEdgeM", "Jungle", "JungleM", "JungleEdge", "JungleEdgeM"}, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + decoration = "mcl_bamboo:bamboo_endcap", + height = 1, + max_height = 4, + flags = "all_floors", + }) + + minetest.register_decoration({ + deco_type = "simple", + place_on = {"group:grass_block_no_snow"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.012, + spread = {x = 100, y = 100, z = 100}, + seed = 354, + octaves = 1, + persist = 0.5, + lacunarity = 1.0, + flags = "absvalue" + }, + biomes = {"BambooJungle", "BambooJungleM"}, + y_max = mcl_vars.mg_overworld_max, + y_min = 2, + decoration = "mcl_core:podzol" + }) + + minetest.register_decoration({ + deco_type = "simple", + place_on = {"group:grass_block_no_snow"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.012, + spread = {x = 100, y = 100, z = 100}, + seed = 354, + octaves = 1, + persist = 0.5, + lacunarity = 1.0, + flags = "absvalue" + }, + biomes = {"BambooJungle", "BambooJungleEdge","BambooJungleM", "BambooJungleEdge"}, + y_max = mcl_vars.mg_overworld_max, + y_min = 1, + decoration = "mcl_flowers:tallgrass" + }) + + minetest.register_decoration({ + deco_type = "simple", + place_on = {"group:grass_block_no_snow"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.012, + spread = {x = 100, y = 100, z = 100}, + seed = 354, + octaves = 1, + persist = 0.5, + lacunarity = 1.0, + flags = "absvalue" + }, + biomes = {"BambooJungle", "BambooJungleM", "BambooJungleEdge"}, + y_max = mcl_vars.mg_overworld_max, + y_min = 2, + decoration = "mcl_mud:mud" + }) + register_doubletall_grass(-0.0005, -0.3, {"BambooJungle", "BambooJungleM", "BambooJungleEdge"}) + register_grass_decoration("tallgrass", -0.03, 1, {"BambooJungle", "BambooJungleM", "BambooJungleEdge"}) + + ----------------- -- Fallen logs -- These fallen logs are not really good yet. They must be longer and also have one upright block. -- Note the decortion API does not like wide schematics, they are likely to overhang. @@ -4282,7 +4557,7 @@ local function register_decorations() octaves = 3, persist = 0.66 }, - biomes = {"BirchForest", "BirchForestM",}, + biomes = {"BirchForest", "BirchForestM", }, y_min = 1, y_max = mcl_vars.mg_overworld_max, schematic = { @@ -4366,23 +4641,23 @@ local function register_decorations() -- Lily pad local lily_schem = { - { name = "mcl_core:water_source" }, - { name = "mcl_flowers:waterlily" }, + {name = "mcl_core:water_source"}, + {name = "mcl_flowers:waterlily"}, } -- Spawn them in shallow water at ocean level in Swampland. -- Tweak lilydepth to change the maximum water depth local lilydepth = 2 - for d=1, lilydepth do + for d = 1, lilydepth do local height = d + 2 local y = 1 - d - table.insert(lily_schem, 1, { name = "air", prob = 0 }) + table.insert(lily_schem, 1, {name = "air", prob = 0}) minetest.register_decoration({ deco_type = "schematic", schematic = { - size = { x=1, y=height, z=1 }, + size = {x = 1, y = height, z = 1}, data = lily_schem, }, place_on = "mcl_core:dirt", @@ -4397,7 +4672,7 @@ local function register_decorations() }, y_min = y, y_max = y, - biomes = { "Swampland_shore" }, + biomes = {"Swampland_shore"}, rotation = "random", }) end @@ -4418,7 +4693,7 @@ local function register_decorations() y_min = 1, y_max = mcl_vars.mg_overworld_max, decoration = "mcl_farming:melon", - biomes = { "Jungle" }, + biomes = {"Jungle"}, }) minetest.register_decoration({ deco_type = "simple", @@ -4435,7 +4710,7 @@ local function register_decorations() y_min = 1, y_max = mcl_vars.mg_overworld_max, decoration = "mcl_farming:melon", - biomes = { "JungleM" }, + biomes = {"JungleM"}, }) minetest.register_decoration({ deco_type = "simple", @@ -4452,7 +4727,7 @@ local function register_decorations() y_min = 1, y_max = mcl_vars.mg_overworld_max, decoration = "mcl_farming:melon", - biomes = { "JungleEdge", "JungleEdgeM" }, + biomes = {"JungleEdge", "JungleEdgeM"}, }) -- Lots of melons in Jungle Edge M @@ -4471,7 +4746,7 @@ local function register_decorations() y_min = 1, y_max = mcl_vars.mg_overworld_max, decoration = "mcl_farming:melon", - biomes = { "JungleEdgeM" }, + biomes = {"JungleEdgeM"}, }) -- Pumpkin @@ -4497,16 +4772,16 @@ local function register_decorations() -- Grasses and ferns local grass_forest = {"Plains", "Taiga", "Forest", "FlowerForest", "BirchForest", "BirchForestM", "RoofedForest", "Swampland", } local grass_mpf = {"MesaPlateauF_grasstop"} - local grass_plains = {"Plains", "SunflowerPlains", "JungleEdge", "JungleEdgeM", "MangroveSwamp" } + local grass_plains = {"Plains", "SunflowerPlains", "JungleEdge", "JungleEdgeM", "MangroveSwamp"} local grass_savanna = {"Savanna", "SavannaM"} - local grass_sparse = {"ExtremeHills", "ExtremeHills+", "ExtremeHills+_snowtop", "ExtremeHillsM", "Jungle" } - local grass_mpfm = {"MesaPlateauFM_grasstop" } + local grass_sparse = {"ExtremeHills", "ExtremeHills+", "ExtremeHills+_snowtop", "ExtremeHillsM", "Jungle"} + local grass_mpfm = {"MesaPlateauFM_grasstop"} - register_grass_decoration("tallgrass", -0.03, 0.09, grass_forest) + 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, 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.03, 0.09, grass_mpf) register_grass_decoration("tallgrass", -0.015, 0.075, grass_mpf) register_grass_decoration("tallgrass", 0, 0.06, grass_mpf) @@ -4520,16 +4795,16 @@ local function register_decorations() register_grass_decoration("tallgrass", 0.05, -0.03, grass_sparse) register_grass_decoration("tallgrass", 0.05, 0.05, grass_mpfm) - local fern_minimal = { "Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "MegaTaiga", "MegaSpruceTaiga", "ColdTaiga", "MangroveSwamp" } - local fern_low = { "Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "MegaTaiga", "MegaSpruceTaiga" } - local fern_Jungle = { "Jungle", "JungleM", "JungleEdge", "JungleEdgeM" } + local fern_minimal = {"Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "MegaTaiga", "MegaSpruceTaiga", "ColdTaiga", "MangroveSwamp"} + local fern_low = {"Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "MegaTaiga", "MegaSpruceTaiga"} + local fern_Jungle = {"Jungle", "JungleM", "JungleEdge", "JungleEdgeM"} --local fern_JungleM = { "JungleM" }, - register_grass_decoration("fern", -0.03, 0.09, fern_minimal) + 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, 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) @@ -4537,17 +4812,17 @@ local function register_decorations() register_grass_decoration("fern", 0.09, -0.03, fern_Jungle) register_grass_decoration("fern", 0.12, -0.03, {"JungleM"}) - local b_seagrass = {"ColdTaiga_ocean","ExtremeHills_ocean","ExtremeHillsM_ocean","ExtremeHills+_ocean","Taiga_ocean","MegaTaiga_ocean","MegaSpruceTaiga_ocean","StoneBeach_ocean","Plains_ocean","SunflowerPlains_ocean","Forest_ocean","FlowerForest_ocean","BirchForest_ocean","BirchForestM_ocean","RoofedForest_ocean","Swampland_ocean","Jungle_ocean","JungleM_ocean","JungleEdge_ocean","JungleEdgeM_ocean","MushroomIsland_ocean","Desert_ocean","Savanna_ocean","SavannaM_ocean","Mesa_ocean","MesaBryce_ocean","MesaPlateauF_ocean","MesaPlateauFM_ocean", -"ColdTaiga_deep_ocean","ExtremeHills_deep_ocean","ExtremeHillsM_deep_ocean","ExtremeHills+_deep_ocean","Taiga_deep_ocean","MegaTaiga_deep_ocean","MegaSpruceTaiga_deep_ocean","StoneBeach_deep_ocean","Plains_deep_ocean","SunflowerPlains_deep_ocean","Forest_deep_ocean","FlowerForest_deep_ocean","BirchForest_deep_ocean","BirchForestM_deep_ocean","RoofedForest_deep_ocean","Swampland_deep_ocean","Jungle_deep_ocean","JungleM_deep_ocean","JungleEdge_deep_ocean","JungleEdgeM_deep_ocean","MushroomIsland_deep_ocean","Desert_deep_ocean","Savanna_deep_ocean","SavannaM_deep_ocean","Mesa_deep_ocean","MesaBryce_deep_ocean","MesaPlateauF_deep_ocean","MesaPlateauFM_deep_ocean", -"Mesa_sandlevel","MesaBryce_sandlevel","MesaPlateauF_sandlevel","MesaPlateauFM_sandlevel","Swampland_shore","Jungle_shore","JungleM_shore","Savanna_beach","FlowerForest_beach","ColdTaiga_beach_water","ExtremeHills_beach"} - local b_kelp = {"ExtremeHillsM_ocean","ExtremeHills+_ocean","MegaTaiga_ocean","MegaSpruceTaiga_ocean","Plains_ocean","SunflowerPlains_ocean","Forest_ocean","FlowerForest_ocean","BirchForest_ocean","BirchForestM_ocean","RoofedForest_ocean","Swampland_ocean","Jungle_ocean","JungleM_ocean","JungleEdge_ocean","JungleEdgeM_ocean","MushroomIsland_ocean", -"ExtremeHillsM_deep_ocean","ExtremeHills+_deep_ocean","MegaTaiga_deep_ocean","MegaSpruceTaiga_deep_ocean","Plains_deep_ocean","SunflowerPlains_deep_ocean","Forest_deep_ocean","FlowerForest_deep_ocean","BirchForest_deep_ocean","BirchForestM_deep_ocean","RoofedForest_deep_ocean","Swampland_deep_ocean","Jungle_deep_ocean","JungleM_deep_ocean","JungleEdge_deep_ocean","JungleEdgeM_deep_ocean","MushroomIsland_deep_ocean" -} + local b_seagrass = {"ColdTaiga_ocean", "ExtremeHills_ocean", "ExtremeHillsM_ocean", "ExtremeHills+_ocean", "Taiga_ocean", "MegaTaiga_ocean", "MegaSpruceTaiga_ocean", "StoneBeach_ocean", "Plains_ocean", "SunflowerPlains_ocean", "Forest_ocean", "FlowerForest_ocean", "BirchForest_ocean", "BirchForestM_ocean", "RoofedForest_ocean", "Swampland_ocean", "Jungle_ocean", "JungleM_ocean", "JungleEdge_ocean", "JungleEdgeM_ocean", "MushroomIsland_ocean", "Desert_ocean", "Savanna_ocean", "SavannaM_ocean", "Mesa_ocean", "MesaBryce_ocean", "MesaPlateauF_ocean", "MesaPlateauFM_ocean", + "ColdTaiga_deep_ocean", "ExtremeHills_deep_ocean", "ExtremeHillsM_deep_ocean", "ExtremeHills+_deep_ocean", "Taiga_deep_ocean", "MegaTaiga_deep_ocean", "MegaSpruceTaiga_deep_ocean", "StoneBeach_deep_ocean", "Plains_deep_ocean", "SunflowerPlains_deep_ocean", "Forest_deep_ocean", "FlowerForest_deep_ocean", "BirchForest_deep_ocean", "BirchForestM_deep_ocean", "RoofedForest_deep_ocean", "Swampland_deep_ocean", "Jungle_deep_ocean", "JungleM_deep_ocean", "JungleEdge_deep_ocean", "JungleEdgeM_deep_ocean", "MushroomIsland_deep_ocean", "Desert_deep_ocean", "Savanna_deep_ocean", "SavannaM_deep_ocean", "Mesa_deep_ocean", "MesaBryce_deep_ocean", "MesaPlateauF_deep_ocean", "MesaPlateauFM_deep_ocean", + "Mesa_sandlevel", "MesaBryce_sandlevel", "MesaPlateauF_sandlevel", "MesaPlateauFM_sandlevel", "Swampland_shore", "Jungle_shore", "JungleM_shore", "Savanna_beach", "FlowerForest_beach", "ColdTaiga_beach_water", "ExtremeHills_beach"} + local b_kelp = {"ExtremeHillsM_ocean", "ExtremeHills+_ocean", "MegaTaiga_ocean", "MegaSpruceTaiga_ocean", "Plains_ocean", "SunflowerPlains_ocean", "Forest_ocean", "FlowerForest_ocean", "BirchForest_ocean", "BirchForestM_ocean", "RoofedForest_ocean", "Swampland_ocean", "Jungle_ocean", "JungleM_ocean", "JungleEdge_ocean", "JungleEdgeM_ocean", "MushroomIsland_ocean", + "ExtremeHillsM_deep_ocean", "ExtremeHills+_deep_ocean", "MegaTaiga_deep_ocean", "MegaSpruceTaiga_deep_ocean", "Plains_deep_ocean", "SunflowerPlains_deep_ocean", "Forest_deep_ocean", "FlowerForest_deep_ocean", "BirchForest_deep_ocean", "BirchForestM_deep_ocean", "RoofedForest_deep_ocean", "Swampland_deep_ocean", "Jungle_deep_ocean", "JungleM_deep_ocean", "JungleEdge_deep_ocean", "JungleEdgeM_deep_ocean", "MushroomIsland_deep_ocean" + } register_seagrass_decoration("seagrass", 0, 0.5, b_seagrass) register_seagrass_decoration("kelp", -0.5, 1, b_kelp) - local b_sponge = {"Plains_deep_ocean","SunflowerPlains_deep_ocean","Forest_deep_ocean","FlowerForest_deep_ocean","BirchForest_deep_ocean","BirchForestM_deep_ocean","RoofedForest_deep_ocean","Jungle_deep_ocean","JungleM_deep_ocean","JungleEdge_deep_ocean","JungleEdgeM_deep_ocean","MushroomIsland_deep_ocean","Desert_deep_ocean","Savanna_deep_ocean","SavannaM_deep_ocean","Mesa_deep_ocean","MesaBryce_deep_ocean","MesaPlateauF_deep_ocean","MesaPlateauFM_deep_ocean"} + local b_sponge = {"Plains_deep_ocean", "SunflowerPlains_deep_ocean", "Forest_deep_ocean", "FlowerForest_deep_ocean", "BirchForest_deep_ocean", "BirchForestM_deep_ocean", "RoofedForest_deep_ocean", "Jungle_deep_ocean", "JungleM_deep_ocean", "JungleEdge_deep_ocean", "JungleEdgeM_deep_ocean", "MushroomIsland_deep_ocean", "Desert_deep_ocean", "Savanna_deep_ocean", "SavannaM_deep_ocean", "Mesa_deep_ocean", "MesaBryce_deep_ocean", "MesaPlateauF_deep_ocean", "MesaPlateauFM_deep_ocean"} -- Wet Sponge -- TODO: Remove this when we got ocean monuments minetest.register_decoration({ @@ -4556,7 +4831,7 @@ local function register_decorations() biomes = b_sponge, spawn_by = {"group:water"}, num_spawn_by = 1, - place_on = {"mcl_core:dirt","mcl_core:sand","mcl_core:gravel"}, + place_on = {"mcl_core:dirt", "mcl_core:sand", "mcl_core:gravel"}, sidelen = 16, noise_params = { offset = 0.00495, @@ -4588,10 +4863,10 @@ local function register_decorations() y_min = 1, y_max = mcl_vars.mg_overworld_max, schematic = { - size = { x=1, y=2, z=1 }, + size = {x = 1, y = 2, z = 1}, data = { - { name = "mcl_core:dirt_with_grass", force_place=true, }, - { name = "mcl_flowers:tallgrass", param2 = minetest.registered_biomes["IcePlains"]._mcl_palette_index }, + {name = "mcl_core:dirt_with_grass", force_place = true, }, + {name = "mcl_flowers:tallgrass", param2 = minetest.registered_biomes["IcePlains"]._mcl_palette_index}, }, }, }) @@ -4611,10 +4886,10 @@ local function register_decorations() y_min = 1, y_max = mcl_vars.mg_overworld_max, schematic = { - size = { x=1, y=2, z=1 }, + size = {x = 1, y = 2, z = 1}, data = { - { name = "mcl_core:dirt_with_grass", force_place=true, }, - { name = "mcl_flowers:tallgrass", param2 = minetest.registered_biomes["ExtremeHills+_snowtop"]._mcl_palette_index }, + {name = "mcl_core:dirt_with_grass", force_place = true, }, + {name = "mcl_flowers:tallgrass", param2 = minetest.registered_biomes["ExtremeHills+_snowtop"]._mcl_palette_index}, }, }, }) @@ -4635,7 +4910,7 @@ local function register_decorations() }, y_min = 4, y_max = mcl_vars.mg_overworld_max, - biomes = {"Desert", "Mesa", "Mesa_sandlevel", "MesaPlateauF", "MesaPlateauF_sandlevel", "MesaPlateauF_grasstop","MesaBryce","Taiga", "MegaTaiga"}, + biomes = {"Desert", "Mesa", "Mesa_sandlevel", "MesaPlateauF", "MesaPlateauF_sandlevel", "MesaPlateauF_grasstop", "MesaBryce", "Taiga", "MegaTaiga"}, decoration = "mcl_core:deadbush", height = 1, }) @@ -4671,7 +4946,7 @@ local function register_decorations() }, y_min = 4, y_max = mcl_vars.mg_overworld_max, - biomes = {"MesaPlateauFM","MesaPlateauFM_sandlevel"}, + biomes = {"MesaPlateauFM", "MesaPlateauFM_sandlevel"}, decoration = "mcl_core:deadbush", height = 1, }) @@ -4742,8 +5017,8 @@ local function register_decorations() -- Mushrooms next to trees local mushrooms = {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown"} - local mseeds = { 7133, 8244 } - for m=1, #mushrooms do + local mseeds = {7133, 8244} + for m = 1, #mushrooms do -- Mushrooms next to trees minetest.register_decoration({ deco_type = "simple", @@ -4760,7 +5035,7 @@ local function register_decorations() 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" }, + spawn_by = {"mcl_core:tree", "mcl_core:sprucetree", "mcl_core:darktree", "mcl_core:birchtree"}, num_spawn_by = 1, }) @@ -4780,8 +5055,8 @@ local function register_decorations() 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" }, + biomes = {"Swampland"}, + spawn_by = {"mcl_core:tree", "mcl_core:sprucetree", "mcl_core:darktree", "mcl_core:birchtree"}, num_spawn_by = 1, }) end @@ -4805,7 +5080,7 @@ local function register_decorations() y_min = 1, y_max = mcl_vars.mg_overworld_max, biomes = biomes, - decoration = "mcl_flowers:"..name, + decoration = "mcl_flowers:" .. name, }) end if is_in_flower_forest then @@ -4813,8 +5088,8 @@ local function register_decorations() deco_type = "simple", place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, sidelen = 80, - noise_params= { - offset = 0.0008*40, + noise_params = { + offset = 0.0008 * 40, scale = 0.003, spread = {x = 100, y = 100, z = 100}, seed = seed, @@ -4824,12 +5099,12 @@ local function register_decorations() y_min = 1, y_max = mcl_vars.mg_overworld_max, biomes = {"FlowerForest"}, - decoration = "mcl_flowers:"..name, + decoration = "mcl_flowers:" .. name, }) end end - local flower_biomes1 = {"Plains", "SunflowerPlains", "RoofedForest", "Forest", "BirchForest", "BirchForestM", "Taiga", "ColdTaiga", "Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Savanna", "SavannaM", "ExtremeHills", "ExtremeHillsM", "ExtremeHills+", "ExtremeHills+_snowtop" } + local flower_biomes1 = {"Plains", "SunflowerPlains", "RoofedForest", "Forest", "BirchForest", "BirchForestM", "Taiga", "ColdTaiga", "Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Savanna", "SavannaM", "ExtremeHills", "ExtremeHillsM", "ExtremeHills+", "ExtremeHills+_snowtop"} register_flower("dandelion", flower_biomes1, 8) register_flower("poppy", flower_biomes1, 9439) @@ -4853,12 +5128,12 @@ local function register_dimension_decorations() --NETHER WASTES (Nether) minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_nether:netherrack","mcl_nether:magma"}, + place_on = {"mcl_nether:netherrack", "mcl_nether:magma"}, sidelen = 16, fill_ratio = 0.04, biomes = {"Nether"}, y_min = mcl_vars.mg_lava_nether_max + 1, - y_max = mcl_vars.mg_nether_max - 1, + y_max = mcl_vars.mg_nether_max - 1, flags = "all_floors", decoration = "mcl_fire:eternal_fire", }) @@ -4869,7 +5144,7 @@ local function register_dimension_decorations() fill_ratio = 0.013, biomes = {"Nether"}, y_min = mcl_vars.mg_lava_nether_max + 1, - y_max = mcl_vars.mg_nether_max - 1, + y_max = mcl_vars.mg_nether_max - 1, flags = "all_floors", decoration = "mcl_mushrooms:mushroom_brown", }) @@ -4880,7 +5155,7 @@ local function register_dimension_decorations() fill_ratio = 0.012, biomes = {"Nether"}, y_min = mcl_vars.mg_lava_nether_max + 1, - y_max = mcl_vars.mg_nether_max - 1, + y_max = mcl_vars.mg_nether_max - 1, flags = "all_floors", decoration = "mcl_mushrooms:mushroom_red", }) @@ -4893,7 +5168,7 @@ local function register_dimension_decorations() fill_ratio = 0.02, biomes = {"WarpedForest"}, y_min = mcl_vars.mg_lava_nether_max + 1, - y_max = mcl_vars.mg_nether_max - 10, + y_max = mcl_vars.mg_nether_max - 10, flags = "all_floors", decoration = "mcl_crimson:warped_fungus", }) @@ -4907,7 +5182,7 @@ local function register_dimension_decorations() y_min = mcl_vars.mg_lava_nether_max + 1, y_max = mcl_vars.mg_nether_max - 15, flags = "all_floors, place_center_x, place_center_z", - schematic = mod_mcl_crimson.."/schematics/warped_fungus_1.mts", + schematic = mod_mcl_crimson .. "/schematics/warped_fungus_1.mts", size = {x = 5, y = 11, z = 5}, rotation = "random", }) @@ -4921,7 +5196,7 @@ local function register_dimension_decorations() y_min = mcl_vars.mg_lava_nether_max + 1, y_max = mcl_vars.mg_nether_max - 10, flags = "all_floors, place_center_x, place_center_z", - schematic = mod_mcl_crimson.."/schematics/warped_fungus_2.mts", + schematic = mod_mcl_crimson .. "/schematics/warped_fungus_2.mts", size = {x = 5, y = 6, z = 5}, rotation = "random", }) @@ -4935,13 +5210,13 @@ local function register_dimension_decorations() y_min = mcl_vars.mg_lava_nether_max + 1, y_max = mcl_vars.mg_nether_max - 14, flags = "all_floors, place_center_x, place_center_z", - schematic = mod_mcl_crimson.."/schematics/warped_fungus_3.mts", + schematic = mod_mcl_crimson .. "/schematics/warped_fungus_3.mts", size = {x = 5, y = 12, z = 5}, rotation = "random", }) minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_crimson:warped_nylium","mcl_crimson:twisting_vines"}, + place_on = {"mcl_crimson:warped_nylium", "mcl_crimson:twisting_vines"}, sidelen = 16, fill_ratio = 0.032, biomes = {"WarpedForest"}, @@ -4980,7 +5255,7 @@ local function register_dimension_decorations() fill_ratio = 0.02, biomes = {"CrimsonForest"}, y_min = mcl_vars.mg_lava_nether_max + 1, - y_max = mcl_vars.mg_nether_max - 10, + y_max = mcl_vars.mg_nether_max - 10, flags = "all_floors", decoration = "mcl_crimson:crimson_fungus", }) @@ -4994,7 +5269,7 @@ local function register_dimension_decorations() y_min = mcl_vars.mg_lava_nether_max + 1, y_max = mcl_vars.mg_nether_max - 10, flags = "all_floors, place_center_x, place_center_z", - schematic = mod_mcl_crimson.."/schematics/crimson_fungus_1.mts", + schematic = mod_mcl_crimson .. "/schematics/crimson_fungus_1.mts", size = {x = 5, y = 8, z = 5}, rotation = "random", }) @@ -5008,7 +5283,7 @@ local function register_dimension_decorations() y_min = mcl_vars.mg_lava_nether_max + 1, y_max = mcl_vars.mg_nether_max - 15, flags = "all_floors, place_center_x, place_center_z", - schematic = mod_mcl_crimson.."/schematics/crimson_fungus_2.mts", + schematic = mod_mcl_crimson .. "/schematics/crimson_fungus_2.mts", size = {x = 5, y = 12, z = 5}, rotation = "random", }) @@ -5022,13 +5297,13 @@ local function register_dimension_decorations() y_min = mcl_vars.mg_lava_nether_max + 1, y_max = mcl_vars.mg_nether_max - 20, flags = "all_floors, place_center_x, place_center_z", - schematic = mod_mcl_crimson.."/schematics/crimson_fungus_3.mts", + schematic = mod_mcl_crimson .. "/schematics/crimson_fungus_3.mts", size = {x = 7, y = 13, z = 7}, rotation = "random", }) minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_crimson:warped_nylium","mcl_crimson:weeping_vines","mcl_nether:netherrack"}, + place_on = {"mcl_crimson:warped_nylium", "mcl_crimson:weeping_vines", "mcl_nether:netherrack"}, sidelen = 16, fill_ratio = 0.063, biomes = {"CrimsonForest"}, @@ -5054,7 +5329,7 @@ local function register_dimension_decorations() --SOULSAND VALLEY minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_blackstone:soul_soil","mcl_nether:soul_sand"}, + place_on = {"mcl_blackstone:soul_soil", "mcl_nether:soul_sand"}, sidelen = 16, fill_ratio = 0.062, biomes = {"SoulsandValley"}, @@ -5065,49 +5340,49 @@ local function register_dimension_decorations() }) minetest.register_decoration({ deco_type = "schematic", - place_on = {"mcl_blackstone:soul_soil","mcl_nether:soulsand"}, + place_on = {"mcl_blackstone:soul_soil", "mcl_nether:soulsand"}, sidelen = 16, fill_ratio = 0.000212, biomes = {"SoulsandValley"}, y_min = mcl_vars.mg_lava_nether_max + 1, flags = "all_floors, place_center_x, place_center_z", - schematic = mod_mcl_blackstone.."/schematics/mcl_blackstone_nether_fossil_1.mts", + schematic = mod_mcl_blackstone .. "/schematics/mcl_blackstone_nether_fossil_1.mts", size = {x = 5, y = 8, z = 5}, rotation = "random", }) minetest.register_decoration({ deco_type = "schematic", - place_on = {"mcl_blackstone:soul_soil","mcl_nether:soulsand"}, + place_on = {"mcl_blackstone:soul_soil", "mcl_nether:soulsand"}, sidelen = 16, fill_ratio = 0.0002233, biomes = {"SoulsandValley"}, y_min = mcl_vars.mg_lava_nether_max + 1, flags = "all_floors, place_center_x, place_center_z", - schematic = mod_mcl_blackstone.."/schematics/mcl_blackstone_nether_fossil_2.mts", + schematic = mod_mcl_blackstone .. "/schematics/mcl_blackstone_nether_fossil_2.mts", size = {x = 5, y = 8, z = 5}, rotation = "random", }) minetest.register_decoration({ deco_type = "schematic", - place_on = {"mcl_blackstone:soul_soil","mcl_nether:soulsand"}, + place_on = {"mcl_blackstone:soul_soil", "mcl_nether:soulsand"}, sidelen = 16, fill_ratio = 0.000225, biomes = {"SoulsandValley"}, y_min = mcl_vars.mg_lava_nether_max + 1, flags = "all_floors, place_center_x, place_center_z", - schematic = mod_mcl_blackstone.."/schematics/mcl_blackstone_nether_fossil_3.mts", + schematic = mod_mcl_blackstone .. "/schematics/mcl_blackstone_nether_fossil_3.mts", size = {x = 5, y = 8, z = 5}, rotation = "random", }) minetest.register_decoration({ deco_type = "schematic", - place_on = {"mcl_blackstone:soul_soil","mcl_nether:soulsand"}, + place_on = {"mcl_blackstone:soul_soil", "mcl_nether:soulsand"}, sidelen = 16, fill_ratio = 0.00022323, biomes = {"SoulsandValley"}, y_min = mcl_vars.mg_lava_nether_max + 1, flags = "all_floors, place_center_x, place_center_z", - schematic = mod_mcl_blackstone.."/schematics/mcl_blackstone_nether_fossil_4.mts", + schematic = mod_mcl_blackstone .. "/schematics/mcl_blackstone_nether_fossil_4.mts", size = {x = 5, y = 8, z = 5}, rotation = "random", }) @@ -5115,10 +5390,10 @@ local function register_dimension_decorations() minetest.register_decoration({ deco_type = "simple", decoration = "mcl_blackstone:basalt", - place_on = {"mcl_blackstone:basalt","mcl_nether:netherrack","mcl_blackstone:blackstone"}, + place_on = {"mcl_blackstone:basalt", "mcl_nether:netherrack", "mcl_blackstone:blackstone"}, sidelen = 80, height_max = 55, - noise_params={ + noise_params = { offset = -0.0085, scale = 0.002, spread = {x = 25, y = 120, z = 25}, @@ -5136,10 +5411,10 @@ local function register_dimension_decorations() minetest.register_decoration({ deco_type = "simple", decoration = "mcl_blackstone:basalt", - place_on = {"mcl_blackstone:basalt","mcl_nether:netherrack","mcl_blackstone:blackstone"}, + place_on = {"mcl_blackstone:basalt", "mcl_nether:netherrack", "mcl_blackstone:blackstone"}, sidelen = 80, height_max = 15, - noise_params={ + noise_params = { offset = -0.0085, scale = 0.004, spread = {x = 25, y = 120, z = 25}, @@ -5157,7 +5432,7 @@ local function register_dimension_decorations() minetest.register_decoration({ deco_type = "simple", decoration = "mcl_blackstone:basalt", - place_on = {"mcl_blackstone:basalt","mcl_nether:netherrack","mcl_blackstone:blackstone"}, + place_on = {"mcl_blackstone:basalt", "mcl_nether:netherrack", "mcl_blackstone:blackstone"}, sidelen = 80, height_max = 3, fill_ratio = 0.4, @@ -5169,24 +5444,24 @@ local function register_dimension_decorations() minetest.register_decoration({ deco_type = "simple", decoration = "mcl_nether:magma", - place_on = {"mcl_blackstone:basalt","mcl_nether:netherrack","mcl_blackstone:blackstone"}, + place_on = {"mcl_blackstone:basalt", "mcl_nether:netherrack", "mcl_blackstone:blackstone"}, sidelen = 80, fill_ratio = 0.082323, biomes = {"BasaltDelta"}, - place_offset_y = -1, + place_offset_y = -1, y_min = mcl_vars.mg_lava_nether_max + 1, flags = "all_floors, all ceilings", }) minetest.register_decoration({ deco_type = "simple", decoration = "mcl_nether:nether_lava_source", - place_on = {"mcl_blackstone:basalt","mcl_nether:netherrack","mcl_blackstone:blackstone"}, - spawn_by = {"mcl_blackstone:basalt","mcl_blackstone:blackstone"}, + place_on = {"mcl_blackstone:basalt", "mcl_nether:netherrack", "mcl_blackstone:blackstone"}, + spawn_by = {"mcl_blackstone:basalt", "mcl_blackstone:blackstone"}, num_spawn_by = 14, sidelen = 80, fill_ratio = 4, biomes = {"BasaltDelta"}, - place_offset_y = -1, + place_offset_y = -1, y_min = mcl_vars.mg_lava_nether_max + 1, y_max = mcl_vars.mg_nether_max - 5, flags = "all_floors, force_placement", @@ -5214,7 +5489,7 @@ local function register_dimension_decorations() decoration = "mcl_end:chorus_plant", height = 1, height_max = 8, - biomes = { "End", "EndMidlands", "EndHighlands", "EndBarrens", "EndSmallIslands" }, + biomes = {"End", "EndMidlands", "EndHighlands", "EndBarrens", "EndSmallIslands"}, }) minetest.register_decoration({ name = "mcl_biomes:chorus_plant", @@ -5235,17 +5510,18 @@ local function register_dimension_decorations() y_max = mcl_vars.mg_end_max, decoration = "mcl_end:chorus_flower", height = 1, - biomes = { "End", "EndMidlands", "EndHighlands", "EndBarrens", "EndSmallIslands" }, + biomes = {"End", "EndMidlands", "EndHighlands", "EndBarrens", "EndSmallIslands"}, }) deco_id_chorus_plant = minetest.get_decoration_id("mcl_biomes:chorus_plant") - minetest.set_gen_notify({decoration=true}, { deco_id_chorus_plant }) + minetest.set_gen_notify({decoration = true}, {deco_id_chorus_plant}) -- TODO: End cities end + -- -- Detect mapgen to select functions -- @@ -5276,7 +5552,7 @@ if mg_name ~= "singlenode" then -- Overworld decorations for v6 are handled in mcl_mapgen_core - local deco_ids_fungus ={ + local deco_ids_fungus = { minetest.get_decoration_id("mcl_biomes:crimson_tree1"), minetest.get_decoration_id("mcl_biomes:crimson_tree2"), minetest.get_decoration_id("mcl_biomes:crimson_tree3"), @@ -5289,51 +5565,55 @@ if mg_name ~= "singlenode" then minetest.get_decoration_id("mcl_biomes:mangrove_tree_2"), minetest.get_decoration_id("mcl_biomes:mangrove_tree_3"), } - for _,f in pairs(deco_ids_fungus) do - minetest.set_gen_notify({decoration=true}, { f }) + for _, f in pairs(deco_ids_fungus) do + minetest.set_gen_notify({decoration = true}, {f}) end - for _,f in pairs(deco_ids_trees) do - minetest.set_gen_notify({decoration=true}, { f }) + for _, f in pairs(deco_ids_trees) do + minetest.set_gen_notify({decoration = true}, {f}) end if deco_id_chorus_plant or deco_ids_fungus or deco_ids_trees then mcl_mapgen_core.register_generator("chorus_grow", nil, function(minp, maxp, blockseed) local gennotify = minetest.get_mapgen_object("gennotify") local pr = PseudoRandom(blockseed + 14) - for _,f in pairs(deco_ids_trees) do - for _, pos in ipairs(gennotify["decoration#"..f] or {}) do - local nn=minetest.find_nodes_in_area(vector.offset(pos,-8,-1,-8),vector.offset(pos,8,0,8),{"mcl_mangrove:mangrove_roots"}) - for _,v in pairs(nn) do - local l = pr:next(2,16) - local n = minetest.get_node(vector.offset(v,0,-1,0)).name - if minetest.get_item_group(n,"water") > 0 then + for _, f in pairs(deco_ids_trees) do + for _, pos in ipairs(gennotify["decoration#" .. f] or {}) do + local nn = minetest.find_nodes_in_area(vector.offset(pos, -8, -1, -8), vector.offset(pos, 8, 0, 8), {"mcl_mangrove:mangrove_roots"}) + for _, v in pairs(nn) do + local l = pr:next(2, 16) + local n = minetest.get_node(vector.offset(v, 0, -1, 0)).name + if minetest.get_item_group(n, "water") > 0 then local wl = "mcl_mangrove:water_logged_roots" if n:find("river") then wl = "mcl_mangrove:river_water_logged_roots" end - minetest.bulk_set_node(minetest.find_nodes_in_area(vector.offset(v,0,0,0),vector.offset(v,0,-l,0),{"group:water"}),{name=wl}) + minetest.bulk_set_node(minetest.find_nodes_in_area(vector.offset(v, 0, 0, 0), vector.offset(v, 0, -l, 0), {"group:water"}), {name = wl}) elseif n == "mcl_mud:mud" then - minetest.bulk_set_node(minetest.find_nodes_in_area(vector.offset(v,0,0,0),vector.offset(v,0,-l,0),{"mcl_mud:mud"}),{name="mcl_mangrove:mangrove_mud_roots"}) + minetest.bulk_set_node(minetest.find_nodes_in_area(vector.offset(v, 0, 0, 0), vector.offset(v, 0, -l, 0), {"mcl_mud:mud"}), {name = "mcl_mangrove:mangrove_mud_roots"}) elseif n == "air" then - minetest.bulk_set_node(minetest.find_nodes_in_area(vector.offset(v,0,0,0),vector.offset(v,0,-l,0),{"air"}),{name="mcl_mangrove:mangrove_roots"}) + minetest.bulk_set_node(minetest.find_nodes_in_area(vector.offset(v, 0, 0, 0), vector.offset(v, 0, -l, 0), {"air"}), {name = "mcl_mangrove:mangrove_roots"}) end end end end - if minp.y > -26900 then return end - for _, pos in ipairs(gennotify["decoration#"..deco_id_chorus_plant] or {}) do + if minp.y > -26900 then + return + end + for _, pos in ipairs(gennotify["decoration#" .. deco_id_chorus_plant] or {}) do local x, y, z = pos.x, pos.y, pos.z if x < -10 or x > 10 or z < -10 or z > 10 then - local realpos = { x = x, y = y + 1, z = z } + local realpos = {x = x, y = y + 1, z = z} local node = minetest.get_node(realpos) if node and node.name == "mcl_end:chorus_flower" then mcl_end.grow_chorus_plant(realpos, node, pr) end end end - if minp.y > mcl_vars.mg_nether_max then return end - for _,f in pairs(deco_ids_fungus) do - for _, pos in ipairs(gennotify["decoration#"..f] or {}) do - minetest.fix_light(vector.offset(pos,-8,-8,-8),vector.offset(pos,8,8,8)) + if minp.y > mcl_vars.mg_nether_max then + return + end + for _, f in pairs(deco_ids_fungus) do + for _, pos in ipairs(gennotify["decoration#" .. f] or {}) do + minetest.fix_light(vector.offset(pos, -8, -8, -8), vector.offset(pos, 8, 8, 8)) end end end)