1

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. – 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
1

From memory, you would add ",tag:{whatever}" without quotes 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/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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