M BUZZ CRAZE NEWS
// updates

How can I summon a named Villager that trades items with a colored name and lore? [duplicate]

By David Jones

I'm trying to create Villagers that buy and sell items with a specific name and lore.

I need a Villager named "Seller" (Without the quotation marks).

"Seller" will buy a Gold Nugget named "&e&lMoney" containing a lore that says "&6M.H.A. &eCurrency" (Again, no quotation marks).

"Seller" will sell a Cookie named "&6M.H.A. &eCookie" containing a lore that says "&eEat &eMe!" (For the last time, no quotation marks).

Please note that I need all of this in Vanilla. Thank you in advance to anyone that helps.

7

1 Answer

/summon villager ~ ~ ~ {CareerLevel:1,Offers:{Recipes:[{buy:{id:"minecraft:gold_nugget",Count:1b,tag:{display:{Name:"&e&lMoney",Lore:["&6M.H.A. &eCurrency"]}}},sell:{id:"minecraft:cookie",Count:1b,tag:{display:{Name:"&6M.H.A. &eCookie",Lore:["&eEat &eMe!"]}}}}]}} would do just that.

/summon villager ~ ~ ~: Summons a villager at the current location

CareerLevel:1: The current level of the villager's trading options. I would recommend setting this high to avoid the villager putting its own trades up.

Offers:{Recipes:[: A list of all the trades made by the villager. All trades must be put in separate {}s

buy:, buyB: The two items in the front of the trade. These must have an item id (id:"minecraft:item") and a count (Count:1b). to set required tags for the item, add tag: and put NBT data in {}s.

sell:: The item the villager is selling. This must also have an item id and a count, with an optional data tag.