2

This question already has an answer here:

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}]}}

marked as duplicate by Virusbomb, greg-449, galacticninja, Joachim, B. S. Morganstein Jul 31 at 19:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • You know, you COULD simply use a villager generator online like This one. – Louis 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
2

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}]}}
0

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

https://mcstacker.bimbimma.com/

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