I'm trying to create a custom mob (like a zombie or armor stand with a tag) that always targets the nearest player as if it were aggressive — but without using mods or external tools.
What I want is:
- The mob follows the nearest player like it's chasing them
- Ideally, it works for multiple players in the world
- Vanilla Java Edition only (1.20+)
- Done through command blocks or functions
I've tried using /tp to teleport the mob toward players every tick, or using /execute as and facing entity @p, but the results are janky or too fast/slow. I know mobs can be made to look at players with /tp facing, but I want the movement too, and as close to natural pursuit as possible.