You'll know if there are enemies around you trying to attack you (except player entities). If you use certain items, you can explore more entities in a wider area.This range can be changed to a specific item.
Select version for changelog:
Changelog
Fixed an issue where the scoreboard identifying some entities exceeded 16 characters and was not recognized properly.