Each recipe (containing a buy item and a sell item) should be in the Recipe
list, looking something like:
Currently, you have the second recipe inside the data of the first recipe's sell item:
The following data should work:
{
Profession: 3,
CustomName: "PvP Villager",
CustomNameVisible: 1,
Career: 1,
CareerLevel: 42,
CanPickUpLoot: 0,
PersistenceRequired: 1,
Invulnerable: 1,
Offers: {
Recipes: [
{
rewardExp: false,
uses: -2147483648,
maxUses: 0,
buy: {
id: gold_block,
Count: 8
},
sell: {
id: potion,
Count: 1,
tag: {
HideFlags: 32,
CustomPotionEffects: [
{
Id: 10,
Amplifier: 1,
Duration: 410
},
{
Id: 22,
Amplifier: 3,
Duration: 2400
},
{
Id: 11,
Amplifier: 0,
Duration: 6000
},
{
Id: 12,
Amplifier: 0,
Duration: 6000
}
],
display: {
Name: "Gods water",
Lore: [
"Who knew water was so good!"
]
}
}
}
},
{
buy: {
id: "diamond_block",
Count: 8
},
maxUses: 9999999,
sell: {
id: "golden_apple",
Count: 1,
Damage: 1
},
rewardExp: false
}
]
}
}
I'd recommend building up commands and testing them along the way, rather than starting with a long command and adding in brackets to try to fix the errors.
tag
is responsible for telling the trade what tags the item has, BlockEntityTag
for telling the item what tags the block has. So you need both:
summon villager ~ ~1 ~ {VillagerData:{profession:leatherworker,level:5,type:plains},CustomName:"\"Banner Clerk\"",Offers:{Recipes:[{buy:{id:golden_hoe,Count:1},buyB:{id:golden_axe,Count:1},sell:{id:red_banner,Count:1,tag:{BlockEntityTag:{Patterns:[{Pattern:"drs",Color:4},{Pattern:"ld",Color:14},{Pattern:"rud",Color:14},{Pattern:"mc",Color:14},{Pattern:"dls",Color:4},{Pattern:"ld",Color:14},{Pattern:"moj",Color:4},{Pattern:"tr",Color:4},{Pattern:"cbo",Color:14},{Pattern:"tts",Color:14}]}}},maxUses:9999999}]}}
Best Answer
Use the
Damage:
value. For example, this villager will buy oak, birch, spruce and jungle wood: