diff --git a/mods/ITEMS/mcl_throwing/throwable.lua b/mods/ITEMS/mcl_throwing/throwable.lua index f0c8450cbb..4e51e94e0c 100644 --- a/mods/ITEMS/mcl_throwing/throwable.lua +++ b/mods/ITEMS/mcl_throwing/throwable.lua @@ -251,9 +251,17 @@ local pearl_on_step = function(self, dtime) end end + local oldpos = player:getpos() + -- Teleport and hurt player player:setpos(telepos) player:set_hp(player:get_hp() - 5) + -- 5% chance to spawn endermite at the player's origin + local r = math.random(1,20) + if r == 1 then + minetest.add_entity(oldpos, "mobs_mc:endermite") + end + end self.object:remove() return