Minecraft Scoreboard Item give Tag Problem [duplicate]

Minecraft Scoreboard Item give Tag Problem [duplicate] - White cane for blind people

I'm trying to give an item a tag in Minecraft 1.11, but it shows me this error:

The dataTag does not match for 4be19781-14d9-467c-ba54-d574273e095c

The commands I'm using are:

/scoreboard players tag @e[type=Item] add T1 {Item:{id:"minecraft:tnt",Count:1}}
/scoreboard players tag @e[type=Item] add T2 {Item:{id:"minecraft:arrow",Count:1}}


Best Answer

When testing for NBT data, you need to match exactly, including the data's type.

As Count is a byte rather than an integer, you need to append b:

/scoreboard players tag @e[type=Item] add T1 {Item:{id:"minecraft:tnt",Count:1b}}

/scoreboard players tag @e[type=Item] add T2 {Item:{id:"minecraft:arrow",Count:1b}}



Pictures about "Minecraft Scoreboard Item give Tag Problem [duplicate]"

Minecraft Scoreboard Item give Tag Problem [duplicate] - Crop anonymous African American father giving big present box to teen son during festive celebration at home
Minecraft Scoreboard Item give Tag Problem [duplicate] - Concept illustration of man with money saying no to offer during business negations on phone
Minecraft Scoreboard Item give Tag Problem [duplicate] - From above of crop unrecognizable male demonstrating green pills in hand against yellow background in daylight





Minecraft TAG Command Tutorial [Working 1.19]




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Eren Li, Any Lane, Monstera, Ivan Babydov