can detect other NBTS, but the names, descriptions do not
The commands used are
/give @p book[custom_name='{"text":"hello"}'] 1
/execute if entity @p[nbt={SelectedItem:{id:"minecraft:book",count:1,components:{"minecraft:custom_name":'{"text":"hello"}'}}}]
Attachments
Comments 4
Per the 23w40a changelog:
Plain-text chat components (text, no sibilings, no stylings) are now always serialized as string
So you need to test for "minecraft:custom_name":'"hello"'
In the future, use /data get
to see how NBT looks before writing your tests
Please include all commands used