I propose to create the /target command, which will be very useful for both datapackers and regular users.
Command Syntax:
/target
How It Will Work:
To lead an entity to specific coordinates, you can use, for example:
/target @e[type=..., limit=1] ~ ~ ~10 3
This means that the entity will move ten blocks in the specified direction, ignoring any factors. If it is hit, it will not become angry and will not try to flee from monsters, but will simply continue moving towards the target.
Priorities:
3: The entity will strive for the target, ignoring everything else.
2: The entity will only become angry if it is hit. For example, villagers will try to flee from zombies, but if the zombie is not attacked, it will continue moving towards the target.
1: The entity will be easily distracted by surrounding factors. For instance, a zombie may attack a player if they come into its line of sight, and only after that will it return to its target.
The command can be used on other entities, including players and armor stands. For example:
/target @e[type=..., limit=1] @e[type=armor_stand, limit=1] 3 attack
In this case, the zombie will strive for the armor stand to break it. Or:
/target @e[type=sheep, limit=1] @e[type=player, limit=1] 3 follow
The sheep will move towards the player until it reaches them.
The command will be one-time use, meaning the entity will move towards the target until it reaches it, after which it will return to its normal behavior. If a target is set, the entity will not rest until it has defeated it.
Please sign in to leave a comment.
0 Comments