mojira.dev
MC-152876

/execute commands are broken.

Put the summary of the bug you're having here

What I expected to happen was...:
/execute command would target players in a specific when targetting a player in a specific dimension.

What actually happened was...:
it didn't.

Steps to Reproduce:
1. /execute if entity @r in minecraft:[dimension] run [command]
2. press enter
3. be disappointed when it targets all dimensions

Comments 1

"if entity @r" is separate to "in minecraft:[dimension]". What is happening here is that you are detecting whether a random player exists and, if so, then running [command] in [dimension].

Fix for this:

/execute in minecraft:[dimension] if entity @a[distance=..84853000] run [command]

84853000 is only really necessary if you're running this from the corner of the world and trying to look for a player at the opposite corner. In reality a much smaller number (say 10000) is needed, depending on your world size.

Noah Lee

(Unassigned)

Unconfirmed

Commands

Minecraft 1.14.1, Minecraft 1.14.2 Pre-Release 2, Minecraft 1.14.2 Pre-Release 3, Minecraft 1.14.2 Pre-Release 4

Retrieved