-2

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.

  • What have you tried so far? You're more likely to get answers if you make an attempt to solve the problem and ask about parts that aren't working, rather than asking us to create the entire thing for you. – SirBenet Sep 5 '16 at 15:05
  • I've used generators, but none of them have custom item name and lore editors. I don't know a lot about command blocks too, so that's why I need your guys' help. – ThePinoyPlayer Sep 5 '16 at 15:11
  • /give @p minecraft:cookie 1 0 {display:{Lore:["Bar"],Name:"Foo"}} would give you a named cookie. Now you can solve the puzzle with the villager yourself. :) – dly Sep 6 '16 at 6:52
  • what about the colored name? – Haroun Mohamed-Fakier Sep 6 '16 at 13:18
  • I know how to add lores and name items, I need help putting those items so that the villager sells it. – ThePinoyPlayer Sep 6 '16 at 22:35
0

Within Minecraft commands, you can't. You would probably need a program such as NBTEdit for it to work. The '&'s are restricted to a multiplayer plugin and won't work in vanilla. However, an enchanted item will have a light blue color, so you could probably add that color with the ench tag.

0

/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.

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.