Inside advancements to run commands you have to have them in double quotes but when tagging an item, to work out which type of item it is you have to do this:
/scoreboard players tag @e[type=item] add diamond_sword {Item:{id:"minecraft:diamond_sword"}}
this doesn't work when you are adding advancements as when you are trying to open the quotes it is actually closing them.
"/scoreboard players tag @e[type=item] add diamond_sword {Item:{id:"minecraft:diamond_sword"}}"
unless I'm doing something completely wrong you can't use single quotes.
As far as I am aware from my tests it is impossible to tag items inside of advancements.
I'm not certain this will work, but in similar contexts the solution is to use an escape character, usually the backslash. Try putting a backslash in front of the quotes you don't want to "count".
I'm not certain this will work, but in similar contexts the solution is to use an escape character, usually the backslash. Try putting a backslash in front of the quotes you don't want to "count".
I did try this earlier like this:
"/scoreboard players tag @e[type=item] add diamond_sword {Item:{id:\"diamond_sword\"}}"
Inside advancements to run commands you have to have them in double quotes but when tagging an item, to work out which type of item it is you have to do this:
this doesn't work when you are adding advancements as when you are trying to open the quotes it is actually closing them.
unless I'm doing something completely wrong you can't use single quotes.
As far as I am aware from my tests it is impossible to tag items inside of advancements.
Can someone help?
I'm not certain this will work, but in similar contexts the solution is to use an escape character, usually the backslash. Try putting a backslash in front of the quotes you don't want to "count".
I did try this earlier like this:
I will try it again but I'm not sure.
Hi.
I tried that and it worked. It doesn't work when you are just putting commands into the chat but if they are in advancement json files it works.
Good to know! I'm glad it worked out.