From 937e1f6999c60bcfdd7f4ffce071a38398931d35 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 26 May 2017 16:13:51 +0200 Subject: [PATCH] No teleport when ender pearl hits ignore --- mods/ITEMS/mcl_throwing/throwable.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_throwing/throwable.lua b/mods/ITEMS/mcl_throwing/throwable.lua index 657a3e3d4..5dfcef212 100644 --- a/mods/ITEMS/mcl_throwing/throwable.lua +++ b/mods/ITEMS/mcl_throwing/throwable.lua @@ -168,7 +168,11 @@ local pearl_on_step = function(self, dtime) -- Destroy when hitting a solid node if self._lastpos.x~=nil then - if (def and def.walkable) or not def then + -- No teleport for hitting ignore for now. Otherwise the player could get stuck. + -- FIXME: This also means the player loses an ender pearl for throwing into unloaded areas + if node.name == "ignore" then + self.object:remove() + elseif (def and def.walkable) or not def then local player = minetest.get_player_by_name(self._thrower) if player then -- Teleport and hurt player