mojira.dev
MC-132813

/execute in (dimension) not working properly

I have been converting commands from 1.12.2 syntax to 1.13 syntax over the past few days. Everything is going well until I hit this point.

I have this command running:

"execute in the_nether run tag @p add inNether"

Which seems to work properly. However, in the same function file I have another command:

"execute in overworld run tag @p remove inNether"

Which runs even if the player is in the Nether. This breaks the ability for me to properly track players moving between the Nether and Overworld, which some of my features use to operate correctly.

EDIT: "execute in the_nether" also runs at a player in the overworld too... almost as if the dimension selector is irrelevant to where the commands will run at all.

 

It used to be this in 1.12.2:

"scoreboard players tag @p add inNether {Dimension:-1}"

to tag only people who are in the Nether.

Comments 2

I found out what was wrong. The syntax changes for Dimension aren't well documented.

tag @p[nbt={Dimension:-1}] add inNether

tag @p[nbt={Dimension:0}] remove inNether

These were the commands I was trying to use. These work the way I intended them to.

Indeed. in and at change dimension, but selectors are still universe-wide. You can also use world binding parameters like so:

/execute in the_nether run say @e[distance=0..] is in the nether

Nikolas

(Unassigned)

Unconfirmed

Minecraft 1.13-pre6

Retrieved