I want to make a special villager that will trade a custom structure block upon the given items. I don't know how to get a villager to trade items with NBT tags though. What would I do with this example:

/summon Villager ~ ~ ~ {Profession:0,CustomName:"Carpenter",CustomNameVisible:0,Career:4,CareerLevel:42,CanPickUpLoot:0,PersistenceRequired:1,Silent:1,Invulnerable:1,Attributes:[{Name:"generic.knockbackResistance",Base:"1f"},{Name:"generic.movementSpeed",Base:"0f"}],Offers:{Recipes:[{buy:{id:"stick",Count:8},buyB:{id:"wooden_pressure_plate",Count:1},maxUses:9999999,sell:{id:"structure_block",Count:1},rewardExp:false}]}}
  • You know, you COULD simply use a villager generator online like This one. – Rikri Dec 12 '16 at 13:41
  • Luiyay, that doesn't allow nbt tags or structure blocks. – Yuki_To_Ame Apr 3 '17 at 10:22

From memory, you would add ,tag:{whatever} after the Count:1 near the end of your command. The "whatever" would be the tags you want.

/summon Villager ~ ~ ~ {Profession:0,CustomName:"Carpenter",CustomNameVisible:0,Career:4,CareerLevel:42,CanPickUpLoot:0,PersistenceRequired:1,Silent:1,Invulnerable:1,Attributes:[{Name:"generic.knockbackResistance",Base:"1f"},{Name:"generic.movementSpeed",Base:"0f"}],Offers:{Recipes:[{buy:{id:"stick",Count:8},buyB:{id:"wooden_pressure_plate",Count:1},maxUses:9999999,sell:{id:"structure_block",Count:1,tag:{whatever}},rewardExp:false}]}}
| improve this answer | |

I don't know how, but you can use the website mcstacker.


| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.