home Forumsplay_arrow Minecraft fiber_manual_record Help

1

Custom Villagers, Selling Custom Items with Command Blocks

submitted 09/23/2015 2:49 pm by doug111973
1 emerald4 replies484 views
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 17 : Journeyman Architect
23

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 17 Journeyman Architect
doug111973
avatar
Anyone? please?
1
09/23/2015 2:57 pm
Level 17 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 3 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

© 2010 - 2018
planetminecraft.com

Welcome