The first snapshot of 1.19.4 (23w03a) added a cool feature, where you can do something with relations using commands. This is really cool, since now I can easily run commands on a target, the owner, the last entity, who attacked a certain entity etc. This is done by doing "execute on" and then the relation you want to chose. This changes the entity, who is executing the command to be that entity, which already gives us many new possibilities but I think it would be better if it was a selector argument. It only lets you change, who is running the command but not the position, where it runs, so you can't simply make the command run at the target for example. It could for example be "@e[relation=target]", which selects the target of the entity, who is currently executing the command. I wanted to make a command that makes players ride on the ender pearl they threw. Since /ride requires 2 selectors, I need to select the player, who needs to ride it first (origin relation would be used in this case) and then the projectile. This is not possible with the current system. If it was a selector, I could just do "/execute as @e[type=sender pearl] run ride @a[relation=origin] mount @s". It would also allow me to make the command run at the origin. Currently if they ender pearl ran the command "execute on origin...", it would run the command as the player, who threw it but still at the ender pearl itself but there is no way to run the command at the player, who threw it.
Please sign in to leave a comment.
0 Comments