From 26e032687a2173b87e4bf6f9702ea46757ac2da6 Mon Sep 17 00:00:00 2001 From: FossFanatic Date: Tue, 17 Jan 2023 12:39:15 +0000 Subject: [PATCH] Fix conflict with most recent master --- mods/MAPGEN/mcl_biomes/init.lua | 1573 ++++++++++++++++++------------- 1 file changed, 917 insertions(+), 656 deletions(-) diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index b24975c06f..af5a7e97e7 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -128,6 +128,10 @@ local function register_biomes() "MesaPlateauF", "MesaPlateauFM", "MangroveSwamp", + "BambooJungle", + "BambooJungleM", + "BambooJungleEdge", + "BambooJungleEdgeM", } local beach_skycolor = "#78A7FF" -- This is the case for all beach biomes except for the snowy ones! Those beaches will have their own colour instead of this one. @@ -1062,8 +1066,6 @@ local end_skycolor = "#000000" _mcl_fogcolor = overworld_fogcolor }) - - -- Mesa Plateau F -- Identical to Mesa below Y=30. At Y=30 and above there is a "dry" oak forest minetest.register_biome({ @@ -1664,8 +1666,193 @@ local end_skycolor = "#000000" _mcl_fogcolor = overworld_fogcolor }) + -- 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_grass_palette_index = 24, + _mcl_skycolor = "#77A8FF", + _mcl_fogcolor = overworld_fogcolor + }) + 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_grass_palette_index = 24, + _mcl_skycolor = "#77A8FF", + _mcl_fogcolor = overworld_fogcolor + }) + 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_grass_palette_index = 24, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor + }) + + -- 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_grass_palette_index = 25, + _mcl_skycolor = "#77A8FF", + _mcl_fogcolor = overworld_fogcolor + }) + 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_grass_palette_index = 25, + _mcl_skycolor = "#77A8FF", + _mcl_fogcolor = overworld_fogcolor + }) + 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_grass_palette_index = 25, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor + }) + + -- 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_grass_palette_index = 26, + _mcl_skycolor = "#77A8FF", + _mcl_fogcolor = overworld_fogcolor + }) + 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_grass_palette_index = 26, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor + }) + + -- 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_grass_palette_index = 27, + _mcl_skycolor = "#77A8FF", + _mcl_fogcolor = overworld_fogcolor + }) + 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_grass_palette_index = 27, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor + }) + -- 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 @@ -1675,11 +1862,11 @@ local end_skycolor = "#000000" 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, @@ -1738,7 +1925,6 @@ local function register_dimension_biomes() param2 = 0, }) - minetest.register_biome({ name = "Nether", node_filler = "mcl_nether:netherrack", @@ -1760,10 +1946,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", @@ -1790,10 +1976,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", @@ -1802,20 +1988,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, @@ -1841,10 +2027,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", @@ -1870,10 +2056,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", @@ -1900,10 +2086,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", @@ -1912,25 +2098,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 ]] @@ -2066,15 +2252,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", @@ -2090,15 +2276,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", @@ -2108,51 +2294,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 @@ -2162,182 +2348,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", @@ -2360,18 +2546,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"}, @@ -2380,56 +2566,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 @@ -2458,7 +2644,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 @@ -2518,17 +2704,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}, @@ -2540,19 +2726,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, @@ -2560,19 +2746,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, @@ -2582,15 +2768,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}, @@ -2602,17 +2788,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}, @@ -2625,22 +2811,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, }) @@ -2648,62 +2834,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 ]] @@ -2722,20 +2908,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, @@ -2743,10 +2929,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, @@ -2756,27 +2942,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, }, @@ -2784,54 +2970,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, }, @@ -2848,11 +3034,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 = { @@ -2863,14 +3049,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_grass_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, @@ -2883,15 +3069,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 = { @@ -2903,10 +3089,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, @@ -2952,48 +3138,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, @@ -3006,7 +3192,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, @@ -3016,12 +3202,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, @@ -3102,20 +3288,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, @@ -3127,7 +3313,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" @@ -3149,7 +3335,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", }) @@ -3170,14 +3356,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"}, @@ -3193,7 +3379,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", }) @@ -3213,7 +3399,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", }) @@ -3234,7 +3420,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", }) @@ -3253,7 +3439,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", }) @@ -3272,7 +3458,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", }) @@ -3292,7 +3478,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", }) @@ -3311,7 +3497,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", }) @@ -3330,7 +3516,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", }) @@ -3350,7 +3536,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", }) @@ -3359,10 +3545,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", }) @@ -3374,7 +3560,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", }) @@ -3394,7 +3580,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", @@ -3415,7 +3601,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", @@ -3437,7 +3623,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", }) @@ -3458,7 +3644,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", }) @@ -3469,10 +3655,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", }) @@ -3482,10 +3668,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", }) @@ -3495,10 +3681,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", }) @@ -3508,10 +3694,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", }) @@ -3521,10 +3707,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", }) @@ -3544,7 +3730,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", @@ -3554,7 +3740,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", @@ -3568,7 +3754,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", @@ -3579,7 +3765,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", @@ -3589,7 +3775,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", }) @@ -3598,7 +3784,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", }) @@ -3606,7 +3792,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"}, @@ -3615,7 +3801,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", }) @@ -3627,7 +3813,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", }) @@ -3642,7 +3828,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", }) @@ -3654,7 +3840,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", }) @@ -3666,7 +3852,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", }) @@ -3678,7 +3864,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", }) @@ -3687,10 +3873,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", }) @@ -3699,10 +3885,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", }) @@ -3712,10 +3898,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", }) @@ -3739,7 +3925,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 @@ -3793,7 +3979,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", }) @@ -3813,7 +3999,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", }) @@ -3833,12 +4019,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"}, @@ -3847,7 +4033,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", }) @@ -3869,7 +4055,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({ @@ -3887,7 +4073,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", }) @@ -3906,7 +4092,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({ @@ -3925,7 +4111,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", @@ -3947,66 +4133,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", }) @@ -4014,50 +4199,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", }) @@ -4113,7 +4298,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", }) @@ -4134,7 +4319,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", }) @@ -4156,9 +4341,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, }) @@ -4181,7 +4366,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({ @@ -4202,23 +4387,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_grass_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"}, @@ -4233,7 +4418,7 @@ local function register_decorations() }, y_min = 1, y_max = mcl_vars.mg_overworld_max, - biomes = { biomes[b] }, + biomes = {biomes[b]}, }) end end @@ -4244,16 +4429,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_grass_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"}, @@ -4273,8 +4458,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", "BambooJungleM"}) -- Large flowers local function register_large_flower(name, biomes, seed, offset, flower_forest_offset) @@ -4284,24 +4469,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"}, @@ -4345,7 +4530,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({ @@ -4360,10 +4545,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({ @@ -4378,10 +4563,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({ @@ -4396,13 +4581,84 @@ 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 = 9, + max_height = 11, + 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 = 9, + max_height = 12, + flags = "place_center_x, place_center_z", + rotation = "random", + }) + --[[ + -- commenting out this section because with the new grow code, bamboo creates its own height, and therefore places it's own top. + 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", "BambooJungleEdge","BambooJungleM", "BambooJungleEdge"}, + y_max = mcl_vars.mg_overworld_max, + y_min = 1, + decoration = "mcl_flowers:tallgrass" + }) + + 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. @@ -4485,7 +4741,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 = { @@ -4569,23 +4825,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", @@ -4600,7 +4856,7 @@ local function register_decorations() }, y_min = y, y_max = y, - biomes = { "Swampland_shore" }, + biomes = {"Swampland_shore"}, rotation = "random", }) end @@ -4621,7 +4877,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", @@ -4638,7 +4894,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", @@ -4655,7 +4911,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 @@ -4674,7 +4930,7 @@ local function register_decorations() y_min = 1, y_max = mcl_vars.mg_overworld_max, decoration = "mcl_farming:melon", - biomes = { "JungleEdgeM" }, + biomes = {"JungleEdgeM"}, }) -- Pumpkin @@ -4700,16 +4956,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) @@ -4723,16 +4979,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) @@ -4740,17 +4996,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({ @@ -4759,7 +5015,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, @@ -4791,10 +5047,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_grass_palette_index }, + {name = "mcl_core:dirt_with_grass", force_place = true, }, + {name = "mcl_flowers:tallgrass", param2 = minetest.registered_biomes["IcePlains"]._mcl_grass_palette_index}, }, }, }) @@ -4814,10 +5070,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_grass_palette_index }, + {name = "mcl_core:dirt_with_grass", force_place = true, }, + {name = "mcl_flowers:tallgrass", param2 = minetest.registered_biomes["ExtremeHills+_snowtop"]._mcl_grass_palette_index}, }, }, }) @@ -4838,7 +5094,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, }) @@ -4874,7 +5130,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, }) @@ -4945,8 +5201,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", @@ -4963,7 +5219,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, }) @@ -4983,8 +5239,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 @@ -5008,7 +5264,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 @@ -5016,8 +5272,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, @@ -5027,12 +5283,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) @@ -5056,12 +5312,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", }) @@ -5072,7 +5328,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", }) @@ -5083,7 +5339,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", }) @@ -5096,7 +5352,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", }) @@ -5110,7 +5366,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", }) @@ -5124,7 +5380,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", }) @@ -5138,13 +5394,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"}, @@ -5183,7 +5439,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", }) @@ -5197,7 +5453,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", }) @@ -5211,7 +5467,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", }) @@ -5225,13 +5481,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"}, @@ -5257,7 +5513,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"}, @@ -5268,49 +5524,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", }) @@ -5318,10 +5574,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}, @@ -5339,10 +5595,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}, @@ -5360,7 +5616,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, @@ -5372,24 +5628,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", @@ -5417,7 +5673,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", @@ -5438,17 +5694,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 -- @@ -5479,7 +5736,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"), @@ -5492,51 +5749,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)