#I am making a datapack and it is not working properly

1 messages · Page 1 of 1 (latest)

brittle gyroBOT
#
**Someone will come and help soon!**

💬 While you wait, take this time to provide more context and details. What are you trying to achieve overall - maybe there's an easier way to solve this problem

🙇 If it's been 30 minutes and you're still waiting for someone to help, hit the Summon Helpers button to call the official helpers here

✅ Once your question has been resolved (or you no longer need it), hit the Resolve Question button or run /resolve

weak remnant
#

Change Tags:["Strength:1"] just to Strength:1

grizzled bobcat
#

Should be:
effect give @a[nbt={Inventory:[{Slot:-106b,tag:{Tags:["Strength:1"]}}]}] strength 1 1 true

weak remnant
#

i suggest you don’t necessarily do that ^^^

#

since the generally agreed-upon convention is to use key:value

#

Tags:[] is just for entities

#

it will work, yes, and if you prefer it then go ahead

jagged pine
#

But I mean if it works it works soo

weak remnant
#

what i meant was like

#

Tags:[] generally isn’t the convention people use

#

not the other way round

jagged pine
#

Ik

tired orbit
#

The give command should be

give @p totem_of_undying{Strength:1,tags:1b,display:{Name:'[{"text":"Totem of ","italic":false},{"text":"Strength","italic":true,"color":"red"}]'}}
hushed pasture
#

they left lol

brittle gyroBOT
# brittle gyro
Question Closed

Your question, #1176612017910587492 (I am making a datapack and it is not working properly), was resolved!

Original Message

I am making a datapack and currently trying to make items that give effects while in the offhand and it has been working fine until I try to add a custom name. anyone know why? here is the code I am using:
/give @p totem_of_undying{Tags:["Strength:1"],tags:1b,display:{Name:'[{"text":"Totem of ","italic":false},{"text":"Strength","italic":true,"color":"red"}]'}} 1
and
effect give @a [nbt={Inventory:[{Slot:-106b,tag:{Strength:1}}]}] strength 1 1 true

Duration open

22h52m

weak remnant