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
is duplicated by1
Created Issue:
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
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
is duplicated by
relates to
Thank you for your report!
However, this issue has been closed as Cannot Reproduce.
We were unable to reproduce the problem you are describing. I'm trying to work through the /execute command bugs, and I noticed that your example is trying to detect an invalid block id (Stone -1).
I think the issue here is the relative position not working correctly, as detailed in MCPE-20543.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Feedback – 📖 Game Wiki
Thank you for your report!
However, this issue has been closed as a Duplicate of MCPE-20543.
It has been linked to this report. If you have additional information, please add it to that report.
If you have not, please search before reporting, as it's likely that one exists already.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Feedback – 📖 Game Wiki
Verification builds:
1.1.0.4 Retail
Summary:
When teleporting with an ender pearl, the target location is too high, meaning you 'land' in the air, and then fall by one block.
Steps to Reproduce
Method 1
- Fire an ender pearl
- When you land, notice how the player falls by one block
Method 2
- Fire an ender pearl onto some tilled soil
- Notice that you fall down and trample the ground
Observed Results:
The target location probably uses the players head (camera) as the coordinate, rather than the ground or the players' feet.
Expected Results:
The player should land on the ground at the target location, not in the air
Screenshots/Videos attached: No
Notes:
Possibly related to MCPE-20543 (incorrect player reference coordinates)
Added world download showcasing the bug.
The command causes much lag