diff --git a/mods/CORE/mcl_init/init.lua b/mods/CORE/mcl_init/init.lua index 6c2a414e2c..7fc13dcfea 100644 --- a/mods/CORE/mcl_init/init.lua +++ b/mods/CORE/mcl_init/init.lua @@ -17,6 +17,9 @@ if mg_name ~= "flat" then else -- 1 perfectly flat bedrock layer local ground = minetest.get_mapgen_setting("mgflat_ground_level") + if not ground then + ground = 8 + end mcl_vars.bedrock_overworld_min = ground - 3 mcl_vars.bedrock_overworld_max = mcl_vars.bedrock_overworld_min mcl_vars.bedrock_is_rough = false diff --git a/mods/MAPGEN/mcl_mapgen_core/init.lua b/mods/MAPGEN/mcl_mapgen_core/init.lua index 1c09a001b1..1c7d19c354 100644 --- a/mods/MAPGEN/mcl_mapgen_core/init.lua +++ b/mods/MAPGEN/mcl_mapgen_core/init.lua @@ -345,11 +345,6 @@ local function register_mgv6_decorations() end -local mg_name = minetest.get_mapgen_setting("mg_name") -if mg_name == "v6" then - register_mgv6_decorations() -end - minetest.register_on_generated(function(minp, maxp, seed) if maxp.y >= 2 and minp.y <= 0 then -- Generate clay @@ -531,3 +526,13 @@ minetest.register_on_generated(function(minp, maxp) end end) +-- Apply mapgen-specific mapgen code +local mg_name = minetest.get_mapgen_setting("mg_name") +if mg_name == "v6" then + register_mgv6_decorations() +end +if mg_name == "flat" then + minetest.set_mapgen_setting("mg_flags", "nocaves,nodungeons,nodecorations") +else + minetest.set_mapgen_setting("mg_flags", "nodungeons") +end