From bd31808beda5f939bd1112da7665762197098f97 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Fri, 3 Jan 2025 16:17:39 -0600 Subject: [PATCH] Fix ender pearl crash --- mods/ITEMS/mcl_throwing/ender_pearl.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_throwing/ender_pearl.lua b/mods/ITEMS/mcl_throwing/ender_pearl.lua index f270774c3..d6f542ade 100644 --- a/mods/ITEMS/mcl_throwing/ender_pearl.lua +++ b/mods/ITEMS/mcl_throwing/ender_pearl.lua @@ -31,7 +31,7 @@ function on_collide(self, pos, node) end -- Make sure we have a reference to the player - local player = self._thrower and core.get_player_by_name(self._thrower) + local player = self._owner and core.get_player_by_name(self._owner) if not player then return end -- Teleport and hurt player @@ -113,7 +113,6 @@ vl_projectile.register("mcl_throwing:ender_pearl_entity",{ on_step = vl_projectile.update_projectile, _lastpos={}, - _thrower = nil, -- Player ObjectRef of the player who threw the ender pearl _vl_projectile = { behaviors = { vl_projectile.collides_with_solids,