diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/death_logic.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/death_logic.lua index fd95b60ef..57cb6e4e5 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/death_logic.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/death_logic.lua @@ -87,6 +87,12 @@ end mobs.death_logic = function(self, dtime) + + --stop crashing game when object is nil + if not self or not self.object or not self.object:get_luaentity() then + return + end + self.death_animation_timer = self.death_animation_timer + dtime --get all attached entities and sort through them