diff --git a/mods/MAPGEN/mcl_mapgen_core/init.lua b/mods/MAPGEN/mcl_mapgen_core/init.lua index 05c88cf5..965a46f5 100644 --- a/mods/MAPGEN/mcl_mapgen_core/init.lua +++ b/mods/MAPGEN/mcl_mapgen_core/init.lua @@ -1,4 +1,9 @@ -mcl_mapgen_core = {} +mcl_mapgen_core = { + replace_nether_roof_void_with_air = minetest.settings:get_bool( + "mcl_mapgen_core_replace_nether_roof_void_with_air", + false + ) +} mcl_mapgen_core.registered_generators = {} local lvm, nodes, param2 = 0, 0, 0 @@ -2296,3 +2301,24 @@ function mcl_mapgen_core.get_node(p, force, us_timeout) return node -- it still can return "ignore", LOL, even if force = true, but only after time out end + + +if mcl_mapgen_core.replace_nether_roof_void_with_air then + minetest.register_lbm({ + label = "Replace Nether roof void from MineClone2 <0.71 with air", + name = "mcl_mapgen_core:replace_nether_roof_void_with_air", + nodenames = { "mcl_core:void" }, + run_at_every_load = false, + action = function(pos, node) + if ( + pos.y >= mcl_vars.mg_bedrock_nether_top_max and + pos.y <= mcl_vars.mg_nether_max + ) then + minetest.swap_node( + pos, + { name="air" } + ) + end + end, + }) +end diff --git a/settingtypes.txt b/settingtypes.txt index cd8201ac..0fa21993 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -152,3 +152,8 @@ basic_pseudobiome_villages (Enables very basic, and experimental "pseudobiome-ba # If enabled, will run an LBM to fix the top 1/2 of double plants in mcimported worlds; defaults to true. fix_doubleplants (Mcimport double plant fixes) bool true + +# If enabled, will run an LBM to replace void nodes on the Nether roof generated by MineClone2 <0.71 with air. +# Activate this setting if you generated some Nether in MineClone2 <0.71 and want to build on the Nether roof. +# WARNING: This setting has quite poor performance and may lag Minetest while affected areas are being fixed. +mcl_mapgen_core_replace_nether_roof_void_with_air (Replace Nether roof void from MineClone2 <0.71 with air) bool false