Item format/Enchantments

Minecraft Wiki article. Categories: Removed_features, Top-level_data_pages

📌 Mirrored from Minecraft Wiki

This article is reproduced from Item format/Enchantments on the Minecraft Wiki. Mirrored from revision 2543992. It is licensed CC BY-NC-SA 3.0 by the Minecraft Wiki contributors — not under the Codex’s CC BY-SA 4.0, and it may not be used commercially. Edits belong upstream, not here.

BlockSprite rose.png: Sprite image for rose in Minecraft
This page describes content that has been removed and was only present in earlier versions of Java Edition.
 
In Java Edition 1.20.5, this format has been replaced with the data component format.
    • [NBT List / JSON Array] Enchantments: Contains enchantments on this item that affect the way the item works.
      • [NBT Compound / JSON Object]: A single enchantment.
        • [String] id: The name of the enchantment.
        • [Short] lvl: The level of the enchantment, where 1 is level 1. Values are clamped between 0 and 255 when reading.
    • [NBT List / JSON Array] StoredEnchantments: Contains enchantments for enchanted books.
      • [NBT Compound / JSON Object]: A stored enchantment, identical structure to each enchantment in Enchantments.
    • [Int] RepairCost: Number of experience levels to add to the base level cost when repairing, combining, or renaming this item with an Anvil.

Sources