Could someone tell me what is wrong with my command? I renamed a tripwire hook as a key. That way if the player has that named key and is in the right location it can open a space where there is a barrel. I have it on repeat, unconditional, always active. However, it's not working.
/execute if data entity @p[x=-470,y=76,z=-108,distance=..3,nbt={SelectedItem:{id:"minecraft:tripwire_hook",Count:1b,tag:{display:{Name:"{\"translate\":\"Emma Eden Secrets\"}"}}}}]
I got into chiptune music composition.
You can listen to them on my Youtube channel : https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
Could someone tell me what is wrong with my command? I renamed a tripwire hook as a key. That way if the player has that named key and is in the right location it can open a space where there is a barrel. I have it on repeat, unconditional, always active. However, it's not working.
/execute if data entity @p[x=-470,y=76,z=-108,distance=..3,nbt={SelectedItem:{id:"minecraft:tripwire_hook",Count:1b,tag:{display:{Name:"{\"translate\":\"Emma Eden Secrets\"}"}}}}]
Thank you <3
You're using "translate" for the name? I guess this is the problem
-If you want to find the item anywhere in the inventory:
/execute if data entity @p Inventory[{tag:{display:{Name:'{"text":"Emma Eden Secrets"}'}}}]
-If you want to find the item in the mainhand :
/execute if entity @p[nbt={SelectedItem:{tag:{display:{Name:'{"text":"Emma Eden Secrets"}'}}}}]
And simply add the XYZ and distance
I got into chiptune music composition.
You can listen to them on my Youtube channel :
https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
Thank you so much!!! This totally worked