diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua index 6f5de1300f..f914ab9d58 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua @@ -85,6 +85,11 @@ end -- states are executed here local land_state_execution = function(self,dtime) + --no collisionbox exception + if not self.object:get_properties() then + return + end + local pos = self.object:get_pos() local collisionbox = self.object:get_properties().collisionbox --get the center of the mob @@ -739,6 +744,14 @@ mobs.mob_step = function(self, dtime) self.pause_timer = 0 end + --stop projectile mobs from being completely disabled while stunned + if self.projectile_timer and self.projectile_timer > 0.01 then + self.projectile_timer = self.projectile_timer - dtime + if self.projectile_timer < 0.01 then + self.projectile_timer = 0.01 + end + end + return -- don't allow collision detection --do normal ai else