mojira.dev
MC-236731

Dimension NBT value doesn't work on non-player entities

The NBT tag "Dimension" doesn't exist for any non-player entity.

 

For example, this command will function:

execute at @a[nbt={Dimension:"minecraft:overworld"}] run summon chicken ~ ~ ~

But this command won't work:

execute at @e[type=chicken,nbt={Dimension:"minecraft:overworld"}] run summon chicken ~ ~ ~

When using the non-functioning command, an error message saying "No entity was found" will appear.

 

It is also worth noting that this took effect in 1.16 release candidate 1, but there was no version id I could select.

 

Comments 3

There is no need for the game to store that information, since entities are saved in dimension-specific folders

This makes it difficult for datapack and map makers to detect what dimension an entity is in using commands

You can do that with /execute in dimension as @e[x=0] ...

Gwobble Gwobble

(Unassigned)

Unconfirmed

(Unassigned)

1.17.1

Retrieved