From 6dbd120397b30457de3e998e4422145eb5cef331 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 17 Aug 2017 16:03:26 +0200 Subject: [PATCH] Fix End portal crash --- mods/ITEMS/mcl_portals/portal_end.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_portals/portal_end.lua b/mods/ITEMS/mcl_portals/portal_end.lua index 126e7ae328..44f0e1436d 100644 --- a/mods/ITEMS/mcl_portals/portal_end.lua +++ b/mods/ITEMS/mcl_portals/portal_end.lua @@ -339,10 +339,12 @@ minetest.register_abm({ -- teleport the player minetest.after(3, function(obj, pos, target3) local objpos = obj:getpos() + if objpos == nil then + return + end -- If player stands, player is at ca. something+0.5 -- which might cause precision problems, so we used ceil. objpos.y = math.ceil(objpos.y) - if objpos == nil then return end --maikerumine added for objects to travel if minetest.get_node(objpos).name ~= "mcl_portals:portal_end" then return end