mojira.dev
MCPE-20543

Execute Command - Uses Wrong Player Coordinates

When using the /execute command with coordinates, the relative coordinates start from the wrong place, ie the players head (or top half) rather than the feet.

What I expected to happen:
This command should detect that a player is standing on a stone block: /execute @p ~ ~ ~ detect ~ ~-1 ~ stone 0 kill @p ("-1" is one below the player)

What actually happened:
However only this command works: /execute @p ~ ~ ~ detect ~ ~-2 ~ stone 0 kill @p - Which means the relative position is starting from the wrong place (ie the head not the feet)

Steps to Reproduce:

  • Standing on the ground (grass), use the command /setblock ~ ~-1 ~ stone, it places a stone block directly under your feet

  • Now use the command /execute @p ~ ~ ~ detect ~ ~-1 ~ stone 0 kill @p, nothing happens

  • Now try /execute @p ~ ~ ~ detect ~ ~-2 ~ stone 0 kill @p - It detects the stone block underneath you and executes the /kill command

Edit: Added test world, uses "/give diamond" instead of /kill

Linked issues

Attachments

Comments 2

Added world download showcasing the bug.

The command causes much lag

[Mojang] Mega_Spud (Jay)

(Unassigned)

Confirmed

Android

/execute, command, coordinates

1.0.5.13, 1.1.0.0

1.1.0.9

Retrieved