From c3278d679de89e39ce6d42d94a394f35907c34cf Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 8 Sep 2017 22:46:30 +0200 Subject: [PATCH] Generate giant mushrooms with 1/12 chance --- .../schematics/mcl_mushrooms_giant_brown.mts | Bin 0 -> 327 bytes .../schematics/mcl_mushrooms_giant_red.mts | Bin 0 -> 335 bytes mods/MAPGEN/mcl_biomes/init.lua | 78 +++++++++++++++--- 3 files changed, 67 insertions(+), 11 deletions(-) create mode 100644 mods/ITEMS/mcl_mushrooms/schematics/mcl_mushrooms_giant_brown.mts create mode 100644 mods/ITEMS/mcl_mushrooms/schematics/mcl_mushrooms_giant_red.mts diff --git a/mods/ITEMS/mcl_mushrooms/schematics/mcl_mushrooms_giant_brown.mts b/mods/ITEMS/mcl_mushrooms/schematics/mcl_mushrooms_giant_brown.mts new file mode 100644 index 0000000000000000000000000000000000000000..0fd3e36fa467770c1d2749cb5f838fcb72ff2e66 GIT binary patch literal 327 zcmeYb3HD`RVPIzvU|_Ge2ZDM8U|?lnPRuM~(9KQGiO(%9&M3;y&n>n}D#|a@=}W!w24$+oSBl!phcwOlKcV&bt2Rjm!#%a%y~QcBG&;04u-4W z?$_>$_Pa6ZpqyLRrq7PO4<>OfVBt_{yvQEOG;7zbEh$+|YK3d_FaOJty}RrA&!W$D z^*dMo`|qUw%I3wXs{1RGuCo2Oa{6y@jV7F!jiroegeNjdq+ z+40GV1@X!GMR}=344OnKF3wCzWl$xkw74WSmqCM|GLZEp`2`hoj!tRhYf#{DVf~eF zf0u=K)7GhnAI(y~Rda8S@lpjxr=Jf(wnlbznQ&~~{>r1w*K60S{an?p+eNqgPIk|D z_DAW?hFkCp%c literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index 139a256949..aa42bd0413 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -24,7 +24,6 @@ end local function register_biomes() --[[ OVERWORLD ]] - -- Ice spikes minetest.register_biome({ name = "ice_plains_spike", @@ -1597,61 +1596,118 @@ local function register_decorations() }) + local ratio_mushroom = 0.0001 + local ratio_mushroom_huge = ratio_mushroom * (11/12) + local ratio_mushroom_giant = ratio_mushroom * (1/12) + local ratio_mushroom_mycelium = 0.002 + local ratio_mushroom_mycelium_huge = ratio_mushroom_mycelium * (11/12) + local ratio_mushroom_mycelium_giant = ratio_mushroom_mycelium * (1/12) + -- Huge Brown Mushroom minetest.register_decoration({ deco_type = "schematic", place_on = { "mcl_core:dirt_with_grass", "mcl_core:dirt" }, sidelen = 80, - fill_ratio = 0.0001, + fill_ratio = ratio_mushroom_huge, -- FIXME: Should be roofed forest, but placing it there doesn't work well (leaves often go into mushroom) biomes = { "forest" }, - y_min = mcl_vars.mg_overworld_min, + y_min = 1, y_max = mcl_vars.mg_overworld_max, schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_brown.mts", flags = "place_center_x, place_center_z", rotation = "random", }) + minetest.register_decoration({ + deco_type = "schematic", + place_on = { "mcl_core:dirt_with_grass", "mcl_core:dirt" }, + sidelen = 80, + fill_ratio = ratio_mushroom_giant, + -- FIXME: Should be roofed forest, but placing it there doesn't work well (leaves often go into mushroom) + biomes = { "forest" }, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_brown.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) minetest.register_decoration({ deco_type = "schematic", place_on = { "mcl_core:mycelium" }, sidelen = 80, - fill_ratio = 0.002, + fill_ratio = ratio_mushroom_mycelium_huge, biomes = { "mushroom_island", "mushroom_island_shore" }, - y_min = mcl_vars.mg_overworld_min, + y_min = 1, y_max = mcl_vars.mg_overworld_max, schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_brown.mts", flags = "place_center_x, place_center_z", rotation = "random", }) + minetest.register_decoration({ + deco_type = "schematic", + place_on = { "mcl_core:mycelium" }, + sidelen = 80, + fill_ratio = ratio_mushroom_mycelium_giant, + biomes = { "mushroom_island", "mushroom_island_shore" }, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_brown.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) -- Huge Red Mushroom minetest.register_decoration({ deco_type = "schematic", place_on = { "mcl_core:dirt_with_grass", "mcl_core:dirt" }, - sidelen = 50, - fill_ratio = 0.0001, + sidelen = 80, + fill_ratio = ratio_mushroom_huge, -- FIXME: Should be roofed forest, but placing it there doesn't work well (leaves often go into mushroom) biomes = { "forest" }, - y_min = mcl_vars.mg_overworld_min, + y_min = 1, y_max = mcl_vars.mg_overworld_max, schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_red.mts", flags = "place_center_x, place_center_z", rotation = "random", }) + minetest.register_decoration({ + deco_type = "schematic", + place_on = { "mcl_core:dirt_with_grass", "mcl_core:dirt" }, + sidelen = 80, + fill_ratio = ratio_mushroom_giant, + -- FIXME: Should be roofed forest, but placing it there doesn't work well (leaves often go into mushroom) + biomes = { "forest" }, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_red.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) minetest.register_decoration({ deco_type = "schematic", place_on = { "mcl_core:mycelium" }, - sidelen = 50, - fill_ratio = 0.002, + sidelen = 80, + fill_ratio = ratio_mushroom_mycelium_huge, biomes = { "mushroom_island", "mushroom_island_shore" }, - y_min = mcl_vars.mg_overworld_min, + y_min = 1, y_max = mcl_vars.mg_overworld_max, schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_red.mts", flags = "place_center_x, place_center_z", rotation = "random", }) + minetest.register_decoration({ + deco_type = "schematic", + place_on = { "mcl_core:mycelium" }, + sidelen = 80, + fill_ratio = ratio_mushroom_mycelium_giant, + biomes = { "mushroom_island", "mushroom_island_shore" }, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_red.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) -- Moss stone boulder (3×3) minetest.register_decoration({