Open MattCM opened 5 years ago
So it likes this.
execute at @e[type=armor_stand,name=Common_Armor_Helmet] run summon item ~ ~ ~ {Item:{id:"minecraft:leather_helmet",Count:1b},tag:{HideFlags:1,Unbreakable:1b,Enchantments:[{id:"minecraft:protection",lvl:4s},{id:"minecraft:fire_protection",lvl:1s},{id:"minecraft:blast_protection",lvl:1s},{id:"minecraft:projectile_protection",lvl:1s},{id:"minecraft:respiration",lvl:1s},{id:"minecraft:aqua_affinity",lvl:1s}]}}
But when you try to add in the display:{Name: '{"text":"name here"}', color:#} it throws the error,
This is because MCC at the moment does not support single quoted string. You will need to only use double quotes and just escape the quotes in the string until I can update the parser.
This will fix the problem for now:
summon item ~ ~ ~ {Item:{id:"minecraft:leather_helmet",Count:1b,tag:{display:{Name:"{\"text\":\"Common Armor Helmet\",\"color\":\"white\",\"bold\":true}",color:16777215},HideFlags:1,Unbreakable:1b}}}
I see, thanks for the work around @42iscool42 ! I'll check this out across the files as it will allow me to spot other errors. Thanks for getting back to this so quickly!
When summoning an item with a custom name the command runs fine in MC but is highlighted as incorrect in sublime.
summon item ~ ~ ~ {Item:{id:"minecraft:leather_helmet",Count:1b,tag:{display:{Name:'{"text":"Common Armor Helmet","color":"white","bold":true}',color:16777215},HideFlags:1,Unbreakable:1b}}}
Thanks for any help on this!