Using Enchantment nbt tag in json recipe

Using Enchantment nbt tag in json recipe - Cheerful ethnic female cutting fresh vegetables on cutting board while sitting at wooden table in kitchen with open portable computer in apartment

I'm making a mod in 1.12.2 and I want to create a recipe when a sword + an enchanted book makes the same type of sword but with the enchants of the enchanted books. (diamond sword + an enchanted book of sharpness level 4 or 5 makes an diamond sword enchanted sharpness 6)

{
  "type": "minecraft:crafting_shaped",
  "group": "enchanted_swords",
  "pattern": [
    "P",
    "B"
  ],
  "key": {
    "P": [
      {
        "type": "minecraft:item_nbt",
        "item": "minecraft:enchanted_book",
        "nbt": {
          "StoredEnchantments":
          "id": 16
          "level": 4
        }
      },
      {
        "type": "minecraft:item_nbt",
        "item": "minecraft:enchanted_book",
        "nbt": {
          "StoredEnchantments":
          "id": 16
          "level": 5
        }
      }
    ],
    "B": {
      "item": "minecraft:water_bucket"
    }
  },
  "result": {
    "type": "minecraft:item_nbt",
    "item": "minecraft:water_bucket",
    "nbt": {
      "StoredEnchantments":
      "id": 16
      "level": 6
    "count": 1
  }
}

I tried to use this link but it only showed for potions so I had to try using the enchanted book wiki but it showed the patern in words not in code so I need help please





Pictures about "Using Enchantment nbt tag in json recipe"

Using Enchantment nbt tag in json recipe - Back view of unrecognizable photographer shooting food vlog with ethnic women in hijabs cooking in modern kitchen
Using Enchantment nbt tag in json recipe - From above of crop anonymous female entrepreneur in formal clothes and name tag on neck sitting at wooden table and typing on laptop during work in office
Using Enchantment nbt tag in json recipe - Crop unrecognizable happy young African American female employee in formal outfit and name tag smiling while having video call on mobile phone sitting on bench on city street



How do you use NBT tags in Minecraft?

NBT tags are used in game commands such as: /summon, /data, /give, /fill, /setblock. The NBT tag is always surrounded in {} such as {NoAI:1}. If there is more than one NBT tag used in a command, the NBT tags are separated by a comma such as {NoAI:1, IsBaby:1}. Each entity (or mob) has its own unique set of NBT tags.

How do you show NBT tags in Minecraft?

Item NBT. To see an Item NBT tag just activate the advanced tooltips by pressing F3+H, the tag will appear inside the tooltip. Longer tags will be presented in an auto scrolling view, the scroll speed can be controlled with SHIFT, to pause scrolling, and ALT, to speed it up.

How do you give enchanted items?

How to enchant items in Minecraft
  • Go to a Minecraft enchanting table and exchange XP and lapis lazuli to enchant an item.
  • At a Minecraft anvil, combine an enchanted book with an unenchanted item \u2013 this uses XP.
  • At an anvil, combine two enchanted items to create one item with two enchantments.





  • Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: EKATERINA BOLOVTSOVA, Nur Andi Ravsanjani Gusma, Ono Kosuki, Ono Kosuki