1

Custom Villagers, Selling Custom Items with Command Blocks

1 emerald 4 replies 471 views | started 09/23/2015 2:49 pm by doug111973
This code makes a villager that sells a zombie head for 50 rotten flesh.. but i also want to add 50 emeralds to the price.. Im new to command blocks.. looking for some help! Thanks!

/summon Villager ~ ~2 ~ {Offers:{Recipes:[{buy:{id:367,Count:50},sell:{id:397,Damage:2,Count:1}}]}}
Posted by avatar
doug111973
Level 15 : Journeyman Architect
22

4 replies

1
09/24/2015 11:45 pm
Level 27 Expert Engineer
Jmal116
avatar
You can add the 'buyB' tag to add a second item to the trade: /summon Villager ~ ~2 ~ {Offers:{Recipes:[{buy:{id:"minecraft:rotten_flesh",Count:50b},buyB:{id:"minecraft:emerald",Count:50b},sell:{id:"minecraft:skull",Damage:2s,Count:1b}}]}}
Also, I made a couple other changes to what you had. I changed all the id's to item names (since they are the only thing supported in newer versions) and added the letters after the Count and Damage values (because commands are weird, and for some reason sometimes you need to do that).
1
09/24/2015 2:42 pm
Level 15 Journeyman Architect
doug111973
avatar
Anyone? please?
1
09/23/2015 2:57 pm
Level 15 Journeyman Architect
doug111973
avatar
Dont want to depend on a plugin, want to use the already in game stuff, before i use plugins.. but thanks
1
09/23/2015 2:55 pm
Level 2 Apprentice Warrior
DubstepRod
avatar
Dont know how to do that with command blocks, but there is a plugin that lets you make custom villager trades.

Search

Browse

Site

© planetminecraft.com

Welcome