diff --git a/mods/MAPGEN/mcl_portals/portal_end.lua b/mods/MAPGEN/mcl_portals/portal_end.lua index 75ef9415fc..126e7ae328 100644 --- a/mods/MAPGEN/mcl_portals/portal_end.lua +++ b/mods/MAPGEN/mcl_portals/portal_end.lua @@ -199,6 +199,14 @@ local function move_check2(p1, max, dir) if minetest.get_node(p).name ~= portal_frame then return false end + -- Abort if any of the portal frame blocks already has metadata. + -- This mod does not yet portals which neighbor each other directly. + -- TODO: Reorganize the way how portal frame coordinates are stored. + local meta = minetest.get_meta(p) + local p1 = meta:get_string("portal_frame1") + if minetest.string_to_pos(p1) ~= nil then + return false + end end return true diff --git a/mods/MAPGEN/mcl_portals/portal_nether.lua b/mods/MAPGEN/mcl_portals/portal_nether.lua index e99cace5f7..3e6b280217 100644 --- a/mods/MAPGEN/mcl_portals/portal_nether.lua +++ b/mods/MAPGEN/mcl_portals/portal_nether.lua @@ -196,6 +196,14 @@ local function move_check(p1, max, dir) if minetest.get_node(p).name ~= "mcl_core:obsidian" then return false end + -- Abort if any of the portal frame blocks already has metadata. + -- This mod does not yet portals which neighbor each other directly. + -- TODO: Reorganize the way how portal frame coordinates are stored. + local meta = minetest.get_meta(p) + local p1 = meta:get_string("portal_frame1") + if minetest.string_to_pos(p1) ~= nil then + return false + end end return true