mojira.dev
MC-124537

Tilde notation working incorrectly in /execute as

I was playing in the latest 1.13 snapshot, I ran the command /execute as @e[type=sheep,distance=..15] run tp @s ~ ~3 ~, expecting all of the sheep within 15 blocks of me to teleport 3 blocks upwards. However, the sheep teleported 3 blocks above me instead. I believed this is an issue with the tilde notation.

I confirmed this when I ran the command /execute as @e[type=sheep,distance=..15] run setblock ~ ~3 ~ stone, where a stone block was placed above me instead of above the sheep.

I hope this is not an intended feature as the commands should be running AS the sheep, so tilde notation should be with respect to the sheep.

Comments 2

Please do not mark unreleased versions as affected.
You don't have access to them yet.

To change the execution position, use at or positioned. If you don't, since you're running from chat, it will default to your position.

Seacraft Gaming

(Unassigned)

Unconfirmed

execute, tilde

Minecraft 18w03b

Retrieved