I know it’s possible to make command blocks that only activate when a certain item is used, but I don’t know how to do it. Any advice? The item in question is a goat horn by the way.
I know it’s possible to make command blocks that only activate when a certain item is used, but I don’t know how to do it. Any advice? The item in question is a goat horn by the way.
Yes you can
/execute as u/a[distance=…2] if entity u/e[type=item,nbt={Item:{id:“minecraft:(item)***“,tag:{display:{Name:'{“text”:”***(Your Item Name)”}'}}}}] run tp u/s ~ ~ ~
u can also if player drop the item. The item destroy and get back
Detect when a player drops an item:
/execute as u/a[nbt={SelectedItem:{id:“minecraft:(item)***“,tag:{display:{Name:'{“text”:”***(Your Item Name)”}'}}}}] at u/s run tp u/e[type=item,sort=nearest,limit=1] ~ ~ ~
Destroy the item:
/kill u/e[type=item,sort=nearest,limit=1]
I don’t know if it’s work in multiplayer, please verification the command