[MCPE-20543] Execute Command - Uses Wrong Player Coordinates Created: 23/Mar/17  Updated: 30/Apr/17  Resolved: 30/Apr/17

Status: Resolved
Project: Minecraft (Bedrock codebase)
Component/s: None
Affects Version/s: 1.0.5.13, 1.1.0.0
Fix Version/s: 1.1.0.9

Type: Bug
Reporter: [Mojang] Mega_Spud (Jay Wells)
Resolution: Fixed Votes: 3
Labels: /execute, command, coordinates

Attachments: File execute command.mcworld    
Issue Links:
Duplicate
is duplicated by MCPE-20891 /execute Not detecting players Resolved
Relates
relates to MCPE-17091 Command suggestions show up if there'... Resolved
relates to MCPE-20413 Successful /execute Command Outputs E... Resolved
relates to MCPE-21362 Ender Pearl Teleportation - Wrong Y C... Resolved
Confirmation Status: Confirmed
Platform: Android
CHK:

 Description   

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



 Comments   
Comment by TDavid65 [ 03/Apr/17 ]

The command causes much lag

Comment by [Mojang] Mega_Spud (Jay Wells) [ 23/Mar/17 ]

Added world download showcasing the bug.

Generated at Sat Jan 11 15:27:29 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.