This command would cause a hostile mob to target another mob or player. Another name for this command could be /anger.
The general syntax would be /aggro <mob> [target]. Only typing the first argument (e.g. "/aggro @e[type=zombie,limit=1]") causes the selected mob(s) to turn hostile to everything around it, much like a Johnny vindicator. Including the second argument limits it to specific mobs or mob types.
Example usages:
-
/aggro @e[type=skeleton,limit=1,sort=nearest] @e[type=spider,limit=1,sort=nearest] turns the nearest skeleton hostile towards the nearest spider.
-
/aggro @e[type=skeleton,limit=1,sort=nearest] @e[type=spider] turns the skeleton hostile towards all spiders, until it dies.
-
/aggro @e[team=RED] @e[team=BLUE] turns all mobs on team "RED" hostile towards everyone on team "BLUE"
-
/aggro @e turns everything into a free-for-all
There could also be a "clear" argument; e.g. /aggro clear @e turns everything passive.
If turning mobs permanently hostile towards another mob type is not feasible due to technical reasons (e.g. would require extra entity data to be stored), then it would still be nice to have a command that changes or resets the mob's current attack target (e.g. change a skeleton's attack target from the player to the nearest zombie instead).
Please sign in to leave a comment.
4 Comments