mojira.dev
MC-190576

checking Dimension NBT data of entity does not return back correct value

Running this command below in 1.15.2 would tp any player who is in the Overworld(Dimension:0) to the Nether at 0 64 0

/execute in minecraft:the_nether as @a if entity @s[nbt={Dimension:0}] run tp 0 64 0

Running this command above in 1.16 Release Candidate 1 will not produce any syntax errors and not tp any players to the nether at position 0 64 0

Additional:
Running this command below with the Dimension:0 removed will work as expected. i.e it will tp all players to the nether at position 0 64 0

/execute in minecraft:the_nether as @a if entity @s[nbt={}] run tp 0 64 0

Comments 3

The Dimension tag changed in 1.16 to be alphanumerical. You can use

/execute in minecraft:the_nether as @a if entity @s[nbt={Dimension:"minecraft:overworld"}] run tp 0 64 0

I should add that Dimension:0 is valid, it matches all players that are in the dimension called minecraft:0.

Robert Loader

(Unassigned)

Unconfirmed

Commands

command, command_block

1.16 Release Candidate 1

Retrieved