Uploaded January 2014 | Updated November 2026, 3 days ago
Command syntax:
/testfor @e[type=EntityName] {dataTags}
For players, you can just use regular player selectors:
/testfor @p {dataTags}
Unfortunately, dataTags of this sort are not checked as a parameter within the selector, meaning that you can only CHECK for dataTags using the /testfor command. This means you cannot teleport a mob based on their NBT tags, only activate further mechanisms which will affect all mobs.
This video displays the different types of tags you can detect. There is a bug with a large number of them (but not all) that requires you to label the NBT tag-types. You can find a full list of tags and tag-types here:
Players & Items: minecraft.gamepedia.com/Player.dat_format
Entities (players have most of these tags as well): minecraft.gamepedia.com/Chunk_format
Forum Topic: minecraftforum.net/topic/2289313-14w02c-testfor-nbt-data
Command syntax:
/testfor @e[type=EntityName] {dataTags}
For players, you can just use regular player selectors:
/testfor @p {dataTags}
Unfortunately, dataTags of this sort are not checked as a parameter within the selector, meaning that you can only CHECK for dataTags using the /testfor command. This means you cannot teleport a mob based on their NBT tags, only activate further mechanisms which will affect all mobs.
This video displays the different types of tags you can detect. There is a bug with a large number of them (but not all) that requires you to label the NBT tag-types. You can find a full list of tags and tag-types here:
Players & Items: minecraft.gamepedia.com/Player.dat_format
Entities (players have most of these tags as well): minecraft.gamepedia.com/Chunk_format
Forum Topic: minecraftforum.net/topic/2289313-14w02c-testfor-nbt-data










