From 80d845adb678e568ed67d081771b04cc0dd85ef5 Mon Sep 17 00:00:00 2001 From: kay27 Date: Mon, 29 Mar 2021 03:18:17 +0400 Subject: [PATCH] [mcl_mapgen_core] Fix Nether generation chain reaction --- mods/ITEMS/mcl_portals/portal_nether.lua | 1 - mods/MAPGEN/mcl_mapgen_core/init.lua | 14 ++++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/mods/ITEMS/mcl_portals/portal_nether.lua b/mods/ITEMS/mcl_portals/portal_nether.lua index 6e2d1e7b6..e842edf81 100644 --- a/mods/ITEMS/mcl_portals/portal_nether.lua +++ b/mods/ITEMS/mcl_portals/portal_nether.lua @@ -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 diff --git a/mods/MAPGEN/mcl_mapgen_core/init.lua b/mods/MAPGEN/mcl_mapgen_core/init.lua index 1a2abf3f9..e08b55ba3 100644 --- a/mods/MAPGEN/mcl_mapgen_core/init.lua +++ b/mods/MAPGEN/mcl_mapgen_core/init.lua @@ -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: