I have this command (who put a black concrete with data=1 in the hotbar)
replaceitem entity @a slot.hotbar 0 black_concrete 1 1
And i have this command who would run the title only when i am holding the black concrete with data=1
execute as @a[hasitem={item=black_concrete, location=slot.weapon.mainhand, data=1}] run titleraw @s actionbar {"rawtext":[{"text":"§a[1] §7[2] [3] [4] [5] [6] [7] [8] [9]§r"}]}
But the titleraw run even if i hold any another black concrete and i don't know why...
#data hasItem selectors issue [RESOLVED]
1 messages · Page 1 of 1 (latest)
unique block data is broken, you need to use an item instead, preferably a non stackable item like music discs, totems, spyglass, etc
why it need to be a non stackable item
Data merging is an issue with items that stack. If I give myself an apple with data=5, then stack them with normal apples, all the apples now have data=5. Makes it an issue when making abilities that rely on item data to be unique and prevent players from duping a special item that gives them effects or abilities.