mojira.dev
MC-129468

Item Tags cannot be test in nbt

It's possible to test item tag in clear command but it's impossible to test in selector with nbt.

Example:

  • /execute as @a[nbt={SelectedItem:{id:"#minecraft:planks"}}] run say @s have Planks

No match in this case.

Linked issues

Comments 3

NBT has to match exactly, and the id is not “#minecraft:planks”.

I don't want to test NBT tag but Item tag name, like block tag or function tag. it's possible to write item or block tag name in CanDestroy/CanPlaceOn, why not for NBT testing?

 

 

You still specify nbt, which has to match exactly; it just check “is it equal? no, fail.”

There is no (good) way to implement nbt tasting using data pack tags, and that would also be a feature request, and not a bug.

Mondemen

(Unassigned)

Confirmed

Minecraft 18w19b

Retrieved