Is there a command with which one can recognize whether an entity (mob) or several are in the vicinity of the player (with a definable block range)?
Execute as @p [distance = .10] at @s if entity @e [type = zombie] run…
Thank you! It all worked out as expected!
As I playd with this command i noticed something, the commands activates if a zombie is in ANY loaded area. The command only activates when the player has the distance 10 or below to the command block, not to the entity.
Because I easily made a mistake.
It should fit like this:
execute as @p at @s if entity @e [type = zombie, distance = .10] run…