From 12f214737248ee68694feeb0187c91438136a58d Mon Sep 17 00:00:00 2001 From: the-real-herowl Date: Fri, 27 Sep 2024 23:34:29 +0200 Subject: [PATCH] Fixed wither skulls - wither skulls now hit players again - wither skulls (strong version) don't cause a crash anymore --- mods/ENTITIES/mobs_mc/wither.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/wither.lua b/mods/ENTITIES/mobs_mc/wither.lua index 21b930500..2b441442b 100644 --- a/mods/ENTITIES/mobs_mc/wither.lua +++ b/mods/ENTITIES/mobs_mc/wither.lua @@ -468,7 +468,7 @@ mcl_mobs.register_arrow("mobs_mc:wither_skull", { on_punch = function(self) end, allow_punching = function(self, _, _, object) local le = object and object:get_luaentity() - return le and le.name ~= "mobs_mc:wither" + return not le or le.name ~= "mobs_mc:wither" end, -- direct hit @@ -524,7 +524,8 @@ mcl_mobs.register_arrow("mobs_mc:wither_skull_strong", { _lifetime = 25, on_punch = function(self) end, allow_punching = function(self, _, _, object) - return object:get_luaentity().name ~= "mobs_mc:wither" + local le = object and object:get_luaentity() + return not le or le.name ~= "mobs_mc:wither" end, -- direct hit