forked from VoxeLibre/VoxeLibre
enable deepslate generation
This commit is contained in:
parent
20ee4d3bdd
commit
b61641c0ca
|
@ -30,7 +30,7 @@ local minecraft_height_limit = 320
|
|||
local superflat = mg_name == "flat" and minetest.get_mapgen_setting("mcl_superflat_classic") == "true"
|
||||
local singlenode = mg_name == "singlenode"
|
||||
|
||||
local convert_old_bedrock = minetest.settings:get_bool("convert_old_bedrock", true)
|
||||
local convert_old_bedrock = minetest.settings:get_bool("mcl_convert_old_bedrock", false)
|
||||
|
||||
-- Calculate mapgen_edge_min/mapgen_edge_max
|
||||
mcl_vars.chunksize = math.max(1, tonumber(minetest.get_mapgen_setting("chunksize")) or 5)
|
||||
|
@ -268,22 +268,37 @@ function mcl_vars.get_node(p, force, us_timeout)
|
|||
end
|
||||
|
||||
-- lbm to update from old mapgen depth to new. potentially affects a lot of nodes inducing lag.
|
||||
if convert_old_bedrock then
|
||||
-- Also it will not generate ores or bedrock pattern.
|
||||
local function register_lbms()
|
||||
minetest.register_lbm({
|
||||
label = "Replace bedrock from old bedrock layer and air/void below to deepslate",
|
||||
name = ":mcl_mapgen_core:replace_old_bedrock",
|
||||
nodenames = { "mcl_core:bedrock","mcl_core:void","mcl_core:barrier"},
|
||||
run_at_every_load = false,
|
||||
action = function(p)
|
||||
if p.y >= mcl_vars.mg_overworld_min and
|
||||
p.y <= mcl_vars.mg_overworld_min_old + 5 --
|
||||
then
|
||||
if p.y <= mcl_vars.mg_bedrock_overworld_max and p.y >= mcl_vars.mg_bedrock_overworld_min then
|
||||
minetest.swap_node(p,{name="mcl_core:bedrock" }) --TODO: bedrock pattern
|
||||
else
|
||||
minetest.swap_node(p,{name="mcl_deepslate:deepslate" })
|
||||
end
|
||||
label = "Replace bedrock from old bedrock layer and air/void below to deepslate",
|
||||
name = ":mcl_mapgen_core:replace_old_bedrock",
|
||||
nodenames = { "mcl_core:bedrock" },
|
||||
run_at_every_load = true,
|
||||
action = function(p)
|
||||
if p.y >= mcl_vars.mg_overworld_min_old - 1 and p.y <= mcl_vars.mg_overworld_min_old + 5 then
|
||||
minetest.swap_node(p,{name="mcl_deepslate:deepslate"})
|
||||
end
|
||||
--minetest.log("bedrock")
|
||||
end
|
||||
})
|
||||
minetest.register_lbm({
|
||||
label = "Replace bedrock from old bedrock layer and air/void below to deepslate",
|
||||
name = ":mcl_mapgen_core:replace_old_void",
|
||||
nodenames = { "mcl_core:void" },
|
||||
run_at_every_load = true,
|
||||
action = function(p)
|
||||
if p.y <= mcl_vars.mg_overworld_min_old and p.y >= mcl_vars.mg_bedrock_overworld_min then
|
||||
if p.y <= mcl_vars.mg_bedrock_overworld_max and p.y >= mcl_vars.mg_bedrock_overworld_min then
|
||||
minetest.swap_node(p,{name="mcl_core:bedrock" })
|
||||
else
|
||||
minetest.swap_node(p,{name="mcl_deepslate:deepslate"})
|
||||
end
|
||||
end,
|
||||
end
|
||||
--minetest.log("void")
|
||||
end
|
||||
})
|
||||
end
|
||||
if convert_old_bedrock then
|
||||
register_lbms()
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue