Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-20543

Execute Command - Uses Wrong Player Coordinates

XMLWordPrintable

    • Confirmed
    • Android

      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

            Mega_Spud [Mojang] Mega_Spud (Jay Wells)
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: