From 08956664073078fd896add1e57ff0a524de2a32f Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Thu, 22 Apr 2021 23:36:58 -0400 Subject: [PATCH] Fix random crash with mixed mob ally data types --- mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua index fc278ae15..41fc4b248 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua @@ -153,8 +153,8 @@ mobs.group_attack_initialization = function(self) if detected_mob._cmi_is_mob and detected_mob.state ~= "attack" and detected_mob.owner ~= name then if detected_mob.name == self.name then turn_hostile(self,detected_mob) - elseif type(detected_mob.group_attack) == "table" then - for _,id in pairs(self.group_attack) do + else + for _,id in pairs(friends_list) do if detected_mob.name == id then turn_hostile(self,detected_mob) break