From 447489f7a99cd92ac1f2515603490d598a0c65a6 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 26 May 2017 15:10:35 +0200 Subject: [PATCH] Fix player fall through floor when use ender pearl --- mods/ITEMS/mcl_throwing/throwable.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_throwing/throwable.lua b/mods/ITEMS/mcl_throwing/throwable.lua index cef4baac..657a3e3d 100644 --- a/mods/ITEMS/mcl_throwing/throwable.lua +++ b/mods/ITEMS/mcl_throwing/throwable.lua @@ -162,6 +162,7 @@ end local pearl_on_step = function(self, dtime) self.timer=self.timer+dtime local pos = self.object:getpos() + pos.y = math.floor(pos.y) local node = minetest.get_node(pos) local def = minetest.registered_nodes[node.name] @@ -171,7 +172,7 @@ local pearl_on_step = function(self, dtime) local player = minetest.get_player_by_name(self._thrower) if player then -- Teleport and hurt player - player:setpos(pos) + player:setpos({x=pos.x, y=pos.y+0.5, z=pos.z}) player:set_hp(player:get_hp() - 5) end self.object:remove()