"execute @a ~ ~ ~ detect" doesn't work correctly when ran in a command block
Steps to reprocude:
1. Place down a repeating command block (unconditional, always active).
2. Paste the current command inside /execute @a ~ ~ ~ detect ~ ~-1 ~ grass 0 say hi
What I expected to happen:
I expected the command to only run when a player is standing on a grass block.
What happens:
The command runs ALWAYS, even if the player isn't on a grass block. After some research I found out that the command block checks the block underneath itself.
Linked Issues
is duplicated by1
Created Issue:
"execute @a ~ ~ ~ detect" doesn't work correctly when ran in repeating command blosk
Steps to reprocude:
1. Place down a repeating command block (unconditional, always active).
2. Paste the current command inside `/execute @a ~ ~ ~ detect ~ ~-1 ~ grass 0 say hi`.What I expected to happen:
I expected the command to only run when a player is standing on a grass block.What happens:
The command runs ALWAYS, even if the player isn't on a grass block.
- Unresolved
- Open
- Unconfirmed
- Windows
- Windows 10
- 1.2.0.18
Steps to reprocude:
1. Place down a repeating command block (unconditional, always active).
2. Paste the current command inside`/execute @a ~ ~ ~ detect ~ ~-1 ~ grass 0 say hi`.What I expected to happen:
I expected the command to only run when a player is standing on a grass block.What happens:
The command runs ALWAYS, even if the player isn't on a grass block.Steps to reprocude:
1. Place down a repeating command block (unconditional, always active).
2. Paste the current command inside /execute @a ~ ~ ~ detect ~ ~-1 ~ grass 0 say hiWhat I expected to happen:
I expected the command to only run when a player is standing on a grass block.What happens:
The command runs ALWAYS, even if the player isn't on a grass block.
Steps to reprocude:
1. Place down a repeating command block (unconditional, always active).
2. Paste the current command inside /execute @a ~ ~ ~ detect ~ ~-1 ~ grass 0 say hiWhat I expected to happen:
I expected the command to only run when a player is standing on a grass block.What happens:
The command runs ALWAYS, even if the player isn't on a grass block.
is duplicated by
Steps to reprocude:
1. Place down a repeating command block (unconditional, always active).
2. Paste the current command inside /execute @a ~ ~ ~ detect ~ ~-1 ~ grass 0 say hiWhat I expected to happen:
I expected the command to only run when a player is standing on a grass block.What happens:
The command runs ALWAYS, even if the player isn't on a grass block. After some research I found out that the command block checks the block underneath itself.
"execute @a ~ ~ ~ detect" doesn't work correctly when ran in a repeating command blosk
"execute @a ~ ~ ~ detect" doesn't work correctly when ran in a repeating command blosk"execute @a ~ ~ ~ detect" doesn't work correctly when ran in a repeating command block
"execute @a ~ ~ ~ detect" doesn't work correctly when ran in arepeatingcommand block
Thank you for your report!
However, this issue has been closed as a Duplicate of MCPE-25065.
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.
Also, please review the guidelines linked below before making further reports, so we can easily reproduce the issue.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Feedback – 📖 Game Wiki
Confirmed for 1.2.0.18 on Windows 10.
When the repeating command block is running, it is looking for a grass block underneath itself. (Test by adding or removing a grass block underneath)
So true. What's worse it only works on grass blocks. It doesn't detect anything else!
Confirmed for 1.2.0.22
Still at 1.2.0.25 ;-;
Confirmed for 1.2.0.25
This happens with every block. This also happens when using impulse command blocks which aren't always active.
This seems to be because the initial detect location doesn't respect executor's position, I'm guessing it's because the position is processed first?
Speculating because it works if you add another execute after it
/execute @a ~ ~ ~ execute @s ~ ~ ~ detect ~ ~-1 ~ sand 0 say hi
But if the second execute is missing it checks for the block underneath the command block (as stated in bug report), that's why I think the order might be different in Win10/PE (which I'd consider an issue).
Seems to be fixed in 1.2.0.31
Amen