diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua index ae28c8cdbc..1ad9cc6592 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua @@ -600,7 +600,7 @@ mobs.mob_step = function(self, dtime) --true for line_of_sight is debug --10 for radius is debug --1 for eye height adjust is debug - local attacking = mobs.detect_players_in_area(self,true,10,1) + local attacking = mobs.detect_closest_player_within_radius(self,true,10,1) if attacking then print(attacking:get_player_name()) diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua index 7935dc7cc1..b5d575ab01 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua @@ -14,7 +14,7 @@ local do_tnt = function(obj, damage) end --a fast function to be able to detect only players without using objects_in_radius -mobs.detect_players_in_area = function(self, line_of_sight, radius, object_height_adder) +mobs.detect_closest_player_within_radius = function(self, line_of_sight, radius, object_height_adder) line_of_sight = line_of_sight or true --fallback line_of_sight radius = radius or 10 -- fallback radius