I was trying to get an emerald with a custom color added to it and have a villager sell the emerald. I was doing well getting both to spawn but when I tried to combine the two it didn't work. Can you tell me what I have done wrong?
/summon villager ~ ~1 ~ {VillagerData:{profession:farmer,level:2,type:plains},Offers:{Recipes:[{buy:{id:acacia_boat,Count:1},sell:{id:emerald,Count:1,tag:{display:{Name:"\"aqua\"",Lore:["\"TOKENNNN\""]}}},maxUses:9999999},{buy:{id:acacia_boat,Count:1},buyB:{id:acacia_boat,Count:1},sell:{id:emerald,Count:1,tag:{display:{Name:"\"Token\",\" color\":\"aqua\",\"italic\":true},{\"text\":\"ken\",\"color\":\"aqua\",\"italic\":true}]\",},HideFlags:1}\""}}},maxUses:9999999}]}}
And the expanded command:
/summon villager ~ ~1 ~
{
VillagerData:{ profession:farmer, level:2, type:plains },
Offers:{
Recipes:[
{
buy:{ id:acacia_boat, Count:1 },
sell:{ id:emerald, Count:1,
tag:{ display:{ Name:"\"aqua\"", Lore:[ "\"TOKENNNN\"" ] } }
},
maxUses:9999999
},
{
buy:{ id:acacia_boat, Count:1 },
buyB:{ id:acacia_boat, Count:1 },
sell:{ id:emerald, Count:1,
tag:{ display:{ Name:"\"Token\",\" color\":\"aqua\",\"italic\":true},{\"text\":\"ken\",\"color\":\"aqua\",\"italic\":true}]\",},HideFlags:1}\"" } }
},
maxUses:9999999
}
]
}
}
To specify the issue, it is only reading the "TOKEN" part of it and not the rest
\" color\"
, which definitely breaks stuff, non-quoted IDs, NBT matching that is not exact (likeCount:1
instead ofCount:1b
in thebuy
tag), … What error messages did you get when you tried it? Some of them should be helpful.