mojira.dev
MC-117625

Executes with relative coordinates in functions doesn't work properly

Create a function with this command
execute @s ~1 ~ ~ /fill ~ ~ ~ ~ 255 ~ dirt

In a command block
execute @p ~ ~ ~ function foo:bar

The pillar of dirt should be placed one in positive X, but it's placed on the player.

Linked issues

Comments 3

I'm confused. Why is this a bug?

If a command block executes `function foo:bar` as @p, doesn't @p become the sender of the function?

execute @s *~1* ~ ~ /fill ~ ~ ~ ~ 255 ~ dirt should create a dirt pillar next to the sender, but from inside a function the pillar is created at the sender's coordinates

Misterx7772

Nathan Adams

Confirmed

Minecraft 1.12 Pre-Release 4

Minecraft 1.12 Pre-Release 5

Retrieved