The new execute sub-command "on" is fantastic however, it doesn't easily allow the testing to see if a relation exists. For example, to see which skeletons are targeting something, the current command is needed: /execute as @e[type=minecraft:skeleton] at @s on target as @e[distance=0] run say I'm targeting something. This is both convoluted and not efficient since @e needs to be used with a distance check.
execute if relation <relation>
I suggest an additional if statement that will test to see if a relation exists without changing the context of the command. The previous example could be rewritten to /execute as @e[type=minecraft:skeleton] if relation target run say I'm targeting something.
Please sign in to leave a comment.
0 Comments