[mcl_mapgen_core] Fix Nether generation chain reaction

This commit is contained in:
kay27 2021-03-29 03:18:17 +04:00
parent 2e3a5efaf9
commit 80d845adb6
2 changed files with 4 additions and 11 deletions

View File

@ -466,7 +466,6 @@ local function ecb_scan_area_2(blockpos, action, calls_remaining, param)
local nodes2 = find_nodes_in_area(node1, node2, {"air"})
if nodes2 then
local nc2 = #nodes2
log("action", "[mcl_portals] nc2=" .. tostring(nc2))
if nc2 == 27 and not is_area_protected(node, node2, name) then
local distance0 = dist(pos, node)
if distance0 < 2 then

View File

@ -2112,16 +2112,10 @@ local function basic(vm, data, data2, emin, emax, area, minp, maxp, blockseed)
end
end
else
minetest.emerge_area(emin, emax, function(blockpos, action, calls_remaining, param)
if calls_remaining > 0 then return end
-- local nodes = minetest.find_nodes_in_area(param.minp, param.maxp, {"mcl_core:water_source"})
local nodes = minetest.find_nodes_in_area(param.minp, param.maxp, {"group:water"})
local sn=(mcl_observers and mcl_observers.swap_node) or minetest.swap_node
local l = {name="mcl_nether:nether_lava_source"}
for _, n in pairs(nodes) do
sn(n, l)
end
end, {minp=vector.new(emin), maxp=vector.new(emax)})
local nodes = minetest.find_nodes_in_area(emin, emax, {"group:water"})
for _, n in pairs(nodes) do
data[area:index(n.x, n.y, n.z)] = c_nether_lava
end
end
-- End block fixes: