From 5fe8717fca92f13817e3d5e11661963b835054fa Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 8 Apr 2020 15:03:03 +0200 Subject: [PATCH] Fix another crash in Mobs mod --- mods/ENTITIES/mcl_mobs/api.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index aedabaa05..86ec7ee31 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -1932,6 +1932,7 @@ end -- execute current state (stand, walk, run, attacks) +-- returns true if mob has died local do_states = function(self, dtime) local yaw = self.object:get_yaw() or 0 @@ -2236,7 +2237,7 @@ local do_states = function(self, dtime) effect(pos, 32, "tnt_smoke.png", nil, nil, node_break_radius, 1, 0) end - return + return true end end @@ -3181,7 +3182,9 @@ local mob_step = function(self, dtime) follow_flop(self) - do_states(self, dtime) + if do_states(self, dtime) then + return + end do_jump(self)