-
Bug
-
Resolution: Invalid
-
None
-
Minecraft 18w16a
-
None
-
Unconfirmed
In the latest snapshot, /teleport is set to work based on the executors location. This works fine, except /execute should be able to work on /tp or /teleport, however, based on the description, and it does not. The best way I can think of describing this is with an example.
In 1.12, if I use the command (in a command block): /execute @p~ ~ ~ teleport @e[type=armor_stand,c=1] ~ ~ ~2
The armor stand is constantly teleported positive 2 blocks on the Z axis beside me, as to be expected.
In 18w16a, if I use the command (also in a command block): /execute as @p run teleport @e[type=armor_stand,limit=1,sort=nearest] ~ ~ ~2
The armor stand is teleported positive 2 blocks on the Z axis beside the command block running the command.
It appears that /execute is unable to change the relative executor, and such causes the command block's coordinates to be the one used, despite the /execute command setting the relative coordinates to mine. I have tried many other of the /execute settings, but was unable to get any of them to work. This also does not work outside of command blocks, if a player were to run an execute on a different entity and teleport something based on it's location, the teleported object will still be teleported to the player, using its relative coordinates.
EDIT: Fix would be /execute as @p at @s run teleport @e[type=armor_stand,limit=1,sort=nearest] ~ ~ ~2, using both at and as, mentioned by Jack Lanois. Still may or may not be a bug.