forked from Mineclonia/Mineclonia
Compare commits
7 Commits
master
...
extend-net
Author | SHA1 | Date |
---|---|---|
Nils Dagsson Moskopp | 36b3b35d28 | |
Nils Dagsson Moskopp | 0c1604e9f8 | |
Nils Dagsson Moskopp | 5f5796330f | |
Nils Dagsson Moskopp | a71e9d70c0 | |
Nils Dagsson Moskopp | dca72c7d97 | |
Nils Dagsson Moskopp | d6741a5e4a | |
Nils Dagsson Moskopp | 58b21fbe79 |
|
@ -131,9 +131,9 @@ mcl_vars.mg_overworld_max = mcl_vars.mapgen_edge_max
|
|||
|
||||
-- The Nether (around Y = -29000)
|
||||
mcl_vars.mg_nether_min = -29067 -- Carefully chosen to be at a mapchunk border
|
||||
mcl_vars.mg_nether_max = mcl_vars.mg_nether_min + 128
|
||||
mcl_vars.mg_nether_max = mcl_vars.mg_nether_min + 256
|
||||
mcl_vars.mg_bedrock_nether_bottom_min = mcl_vars.mg_nether_min
|
||||
mcl_vars.mg_bedrock_nether_top_max = mcl_vars.mg_nether_max
|
||||
mcl_vars.mg_bedrock_nether_top_max = mcl_vars.mg_nether_max - 128
|
||||
if not superflat then
|
||||
mcl_vars.mg_bedrock_nether_bottom_max = mcl_vars.mg_bedrock_nether_bottom_min + 4
|
||||
mcl_vars.mg_bedrock_nether_top_min = mcl_vars.mg_bedrock_nether_top_max - 4
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
local function is_forbidden_node(pos, node)
|
||||
node = node or minetest.get_node(pos)
|
||||
return minetest.get_item_group(node.name, "stair") > 0 or minetest.get_item_group(node.name, "slab") > 0 or minetest.get_item_group(node.name, "carpet") > 0
|
||||
return "mcl_core:bedrock" == node.name or
|
||||
minetest.get_item_group(node.name, "stair") > 0 or
|
||||
minetest.get_item_group(node.name, "slab") > 0 or
|
||||
minetest.get_item_group(node.name, "carpet") > 0
|
||||
end
|
||||
|
||||
function mobs:spawn_abm_check(pos, node, name)
|
||||
-- Don't spawn monsters on mycelium
|
||||
if (node.name == "mcl_core:mycelium" or node.name == "mcl_core:mycelium_snow") and minetest.registered_entities[name].type == "monster" then
|
||||
return true
|
||||
--Don't Spawn mobs on stairs, slabs, or carpets
|
||||
-- Don't spawn mobs on bedrock, stairs, slabs, or carpets
|
||||
elseif is_forbidden_node(pos, node) or is_forbidden_node(vector.add(pos, vector.new(0, 1, 0))) then
|
||||
return true
|
||||
-- Spawn on opaque or liquid nodes
|
||||
|
|
|
@ -2008,7 +2008,7 @@ local function register_dimension_ores()
|
|||
clust_scarcity = 26 * 26 * 26,
|
||||
clust_size = 5,
|
||||
y_min = mcl_vars.mg_lava_nether_max + 10,
|
||||
y_max = mcl_vars.mg_nether_max,
|
||||
y_max = mcl_vars.mg_bedrock_nether_top_max - 1,
|
||||
noise_threshold = 0.0,
|
||||
noise_params = {
|
||||
offset = 0.5,
|
||||
|
@ -2052,7 +2052,7 @@ local function register_dimension_ores()
|
|||
clust_num_ores = 4, -- MC cluster amount: 4-10
|
||||
clust_size = 3,
|
||||
y_min = mcl_vars.mg_nether_min,
|
||||
y_max = mcl_vars.mg_nether_max,
|
||||
y_max = mcl_vars.mg_bedrock_nether_top_max - 1,
|
||||
})
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
|
@ -2062,7 +2062,7 @@ local function register_dimension_ores()
|
|||
clust_num_ores = 8, -- MC cluster amount: 4-10
|
||||
clust_size = 4,
|
||||
y_min = mcl_vars.mg_nether_min,
|
||||
y_max = mcl_vars.mg_nether_max,
|
||||
y_max = mcl_vars.mg_bedrock_nether_top_max - 1,
|
||||
})
|
||||
end
|
||||
|
||||
|
@ -2107,7 +2107,7 @@ local function register_dimension_ores()
|
|||
clust_num_ores = 1,
|
||||
clust_size = 1,
|
||||
y_min = mcl_vars.mg_lava_nether_max + 49,
|
||||
y_max = mcl_vars.mg_nether_max,
|
||||
y_max = mcl_vars.mg_bedrock_nether_top_max - 1,
|
||||
})
|
||||
|
||||
--[[ THE END ]]
|
||||
|
|
|
@ -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
|
||||
|
@ -1784,7 +1789,7 @@ end
|
|||
-- Generate Nether decorations manually: Eternal fire, mushrooms, nether wart
|
||||
-- Minetest's API does not support decorations in caves yet. :-(
|
||||
local generate_nether_decorations = function(minp, maxp, seed)
|
||||
if minp.y > mcl_vars.mg_nether_max or maxp.y < mcl_vars.mg_nether_min then
|
||||
if minp.y > mcl_vars.mg_bedrock_nether_top_max or maxp.y < mcl_vars.mg_nether_min then
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -2022,9 +2027,32 @@ local function basic(vm, data, data2, emin, emax, area, minp, maxp, blockseed)
|
|||
-- [[ THE NETHER: mcl_vars.mg_nether_min mcl_vars.mg_nether_max ]]
|
||||
|
||||
-- The Air on the Nether roof, https://git.minetest.land/MineClone2/MineClone2/issues/1186
|
||||
lvm_used = set_layers(data, area, c_air , nil, mcl_vars.mg_nether_max +1, mcl_vars.mg_nether_max + 128 , minp, maxp, lvm_used, pr)
|
||||
-- This was modified later, see https://git.minetest.land/Mineclonia/Mineclonia/issues/270
|
||||
lvm_used = set_layers(
|
||||
data,
|
||||
area,
|
||||
c_air,
|
||||
nil,
|
||||
mcl_vars.mg_bedrock_nether_top_max + 1,
|
||||
mcl_vars.mg_nether_max,
|
||||
minp,
|
||||
maxp,
|
||||
lvm_used,
|
||||
pr
|
||||
)
|
||||
-- The Void above the Nether below the End:
|
||||
lvm_used = set_layers(data, area, c_void , nil, mcl_vars.mg_nether_max + 128 +1, mcl_vars.mg_end_min -1, minp, maxp, lvm_used, pr)
|
||||
lvm_used = set_layers(
|
||||
data,
|
||||
area,
|
||||
c_void,
|
||||
nil,
|
||||
mcl_vars.mg_nether_max + 1,
|
||||
mcl_vars.mg_end_min - 1,
|
||||
minp,
|
||||
maxp,
|
||||
lvm_used,
|
||||
pr
|
||||
)
|
||||
|
||||
-- [[ THE END: mcl_vars.mg_end_min mcl_vars.mg_end_max ]]
|
||||
|
||||
|
@ -2136,15 +2164,25 @@ local function basic(vm, data, data2, emin, emax, area, minp, maxp, blockseed)
|
|||
if mg_name == "v6" then
|
||||
nodes = minetest.find_nodes_in_area(emin, emax, {"mcl_core:water_source", "mcl_core:stone", "mcl_core:sand", "mcl_core:dirt"})
|
||||
else
|
||||
nodes = minetest.find_nodes_in_area(emin, emax, {"mcl_core:water_source"})
|
||||
nodes = minetest.find_nodes_in_area(emin, emax, {"mcl_core:water_source", "mcl_core:stone"})
|
||||
end
|
||||
for n=1, #nodes do
|
||||
local p_pos = area:index(nodes[n].x, nodes[n].y, nodes[n].z)
|
||||
if data[p_pos] == c_water then
|
||||
if nodes[n].y > mcl_vars.mg_bedrock_nether_top_max then
|
||||
data[p_pos] = c_air -- no lava on the roof pls
|
||||
else
|
||||
data[p_pos] = c_nether_lava
|
||||
end
|
||||
lvm_used = true
|
||||
elseif data[p_pos] == c_stone then
|
||||
data[p_pos] = c_netherrack
|
||||
-- this deals with random stone layers Minetest creates
|
||||
-- see https://github.com/minetest/minetest/issues/9357
|
||||
if nodes[n].y > mcl_vars.mg_bedrock_nether_top_max then
|
||||
data[p_pos] = c_air -- remove stone clouds
|
||||
else
|
||||
data[p_pos] = c_netherrack -- remove stone
|
||||
end
|
||||
lvm_used = true
|
||||
elseif data[p_pos] == c_sand or data[p_pos] == c_dirt then
|
||||
data[p_pos] = c_soul_sand
|
||||
|
@ -2267,3 +2305,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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue