Mojira Archive
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

Fixed

[Mojang] Mega_Spud (Jay Wells)

2017-03-23, 04:42 PM

2017-04-30, 05:01 AM

2017-04-30, 05:01 AM

3

2

Confirmed

/execute, command, coordinates

1.0.5.13, 1.1.0.0

1.1.0.9