From 6e2a7c8a7eda6ddca3af7bb23efa13233c7764c7 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Wed, 7 Apr 2021 13:47:48 +0200 Subject: [PATCH] Make gateway enderpearl teleports easier --- mods/ITEMS/mcl_portals/portal_gateway.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mods/ITEMS/mcl_portals/portal_gateway.lua b/mods/ITEMS/mcl_portals/portal_gateway.lua index fd455ee766..c738da1a46 100644 --- a/mods/ITEMS/mcl_portals/portal_gateway.lua +++ b/mods/ITEMS/mcl_portals/portal_gateway.lua @@ -105,6 +105,11 @@ minetest.register_abm({ if preparing[minetest.pos_to_string(pos)] then return end for _, obj in pairs(minetest.get_objects_inside_radius(pos, 1)) do if obj:get_hp() > 0 then + local luaentity = obj:get_luaentity() + if luaentity and luaentity.name == "mcl_throwing:ender_pearl" then + obj:remove() + obj = luaentity._thrower + end teleport(pos, obj) return end