Forum rules: Do not post bugs or feature requests here! Report bugs to our Issue Tracker and suggestions to Suggest a Feature.

This site is not for solicitation of services or 'purchasing' development. Please do not post requesting side mods/plugins and so on. Your thread will be removed, and you will receive a warning.
User avatar
By OneCryptickilla
#191926 Hello,

I'm currently trying to sell an enchanted item through an NPC shopkeeper. The item I am trying to sell is this

https://gyazo.com/b6619ecdd4eacb76496055e74083ed62

I found nothing regarding enchantments on the wiki and was wondering if I could ask for an example of how I would put this into the shopItems.json.

Thank you in advance!

User avatar
By Some Body
#191943 Enchantments are stored in NBT just like lore. You will need to know how they are stored in order to do this. You will also need to know about Minecraft color codes for text in order to exactly achieve those colors for item name and lore.

For this specific item, the entry in shopItems.json would be something like the following:
Code: Select all    {
      "id": "championKey",
      "name": "pixelmon:icicle_badge",
      "nbtData": "{ench:[{id:35,lvl:1}],display:{Name:\"§bChampion Key\",Lore:[\"§eChampion\"]}}",
      "buy": 10000
    }
JOIN THE TEAM