Minecraft:Enchanting table mechanics
More actions
This article is about the mechanics of Minecraft:enchanting with Minecraft:enchanting tables.
Enchantment selection
Experience cost
When an item is placed in an Minecraft:enchanting table, the Minecraft:experience cost of each enchantment slot is selected depending on the slot and the number of nearby Minecraft:bookshelves, which is capped at 15.
For each slot, a base experience cost is calculated as:
- <math>base=1+\text{randint}\left(7\right)+\left\lfloor\frac{\min\left(15,bookshelves\right)}2\right\rfloor+\text{randint}\left(\min\left(15,bookshelves\right)\right)</math>
- where <math>\text{randint}</math> generates a random integer in range <math>0</math> to <math>n</math> (both inclusive).
The final experience cost is then calculated depending on the slot:
- Top slot: <math>cost=\left\lfloor\max\left(1,\frac{base}3\right)\right\rfloor</math>
- Middle slot: <math>cost=\left\lfloor\frac{2\cdot base}3\right\rfloor+1</math>
- Bottom slot: <math>cost=\left\lfloor\max\left(base,2\cdot bookshelves\right)\right\rfloor</math>
| Bookshelves | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Cost of top slot | 1–2 | 1–3 | 1–3 | 1–4 | 1–4 | 1–5 | 1–5 | 1–6 | 1–6 | 1–7 | 2–7 | 2–8 | 2–8 | 2–9 | 2–9 | 2–10 |
| Cost of middle slot | 1–6 | 1–7 | 2–8 | 2–9 | 3–10 | 3–11 | 3–12 | 3–13 | 4–14 | 4–15 | 5–16 | 5–17 | 5–18 | 5–19 | 6–20 | 6–21 |
| Cost of bottom slot | 1–8 | 2–9 | 4–11 | 6–12 | 8–14 | 10–15 | 12–17 | 14–18 | 16–20 | 18–21 | 20–23 | 22–24 | 24–26 | 26–27 | 28–29 | 30 |
Value
The value for each slot is calculated depending on the item's enchantability and the experience cost:
- <math>value=\text{round}\left(\left(cost+\text{randint}\left(\left\lfloor\frac{enchantability}4\right\rfloor\right)+\text{randint}\left(\left\lfloor\frac{enchantability}4\right\rfloor\right)+1\right)\cdot\left(1+\text{rand}\left(0.15\right)-\text{rand}\left(0.15\right)\right)\right)</math>
- where <math>\text{rand}</math> generates a random number in range <math>0</math> to <math>n</math> (both inclusive).
Template:Anchor Template:IN, an item's enchantability is stored in the Template:Code item component.
| Item | Enchantability |
|---|---|
| Template:ItemSprite Golden Armor | 25 |
| Template:ItemSprite Golden Weapons and Tools | 22 |
| Template:ItemSprite Leather Armor Template:ItemSprite Mace Template:ItemSprite Netherite Armor Template:ItemSprite Netherite Weapons and Tools Template:ItemSprite Wooden Weapons and Tools |
15 |
| Template:ItemSprite Iron Weapons and Tools | 14 |
| Template:ItemSprite Copper Weapons and Tools | 13 |
| Template:ItemSprite Chainmail Armor | 12 |
| Template:ItemSprite Diamond Armor Template:ItemSprite Diamond Weapons and Tools |
10 |
| Template:ItemSprite Iron Armor Template:ItemSprite Turtle Shell |
9 |
| Template:ItemSprite Copper Armor | 8 |
| Template:ItemSprite Stone Weapons and Tools | 5 |
| All other enchantable items | 1 |
Selection
Of every non-treasure enchantment for which the item is a primary item or a Minecraft:book, the highest level for which the <math>value</math> falls within its value range is a candidate.
A candidate is randomly selected based on weights, and incompatible candidates are removed.
As long as candidates remain, more enchantments can be added. There is a probability of <math>\frac{value}{50}</math>, and if it succeeds, a new candidate is randomly selected based on weight, incompatible candidates are removed, the <math>value</math> is divided by <math>2</math> and rounded down, and it repeats until the chance fails or no candidates remain.
Bookshelf placement
Nearby Minecraft:bookshelves raise the available enchantment levels; without any bookshelves, the experience level requirement never exceeds 8. The maximum number of bookshelves affecting enchantment level is 15.
In order to have an effect, a Minecraft:bookshelf must be placed exactly 2 blocks, laterally, off the enchanting table and be on the same level or one block height above the table. Additionally, the bookshelf must not be blocked. The meaning of "blocked" differs in both Template:Els.
Bedrock Edition
The 2-high space between the bookshelf and table must be Minecraft:air (even a torch, snow cover or carpet blocks the effect), where "between" is as shown in the following diagrams (the blank spaces are air, and the Template:BlockSprite do not matter):
| Like this from the top: | or | ||
|---|---|---|---|
| and like this from the side: | or |
Java Edition
The space between the bookshelf and table at the height of the bookshelf must be Minecraft:air or a replaceable block like snow or grass. For corner bookshelves, the space between is 1 block diagonal from the enchanting table; for all other bookshelves, the gap must be to the side of the enchanting table. This is illustrated in the following diagrams (the blank spaces are air, and the Template:BlockSprite do not matter):
| Like this from the top: | or | ||
|---|---|---|---|
| and like this from the side: | or |
The glyph particles, which fly from bookshelves, follow different rules and may appear even if the bookshelves are not enhancing the table.
There are many possible bookshelf arrangements that can reach the enchantment limit. A simple method is to surround the enchanting table with a 1-block high square of bookshelves with an empty space anywhere on the perimeter: Template:BlockGrid Another alternative that is now available is to build a 'library corner' where each bookshelf is two blocks high, as in the plan below. This arrangement gives space for 16 shelves, which is one more than needed, so if the corner bookshelf column cannot be seen, removing one of the two bookshelves in that does not have any effect, either technically or visually. Template:BlockGrid
Selecting an enchantment level
As enchantments offered depend on the enchantment level and the enchantment level depends on the number of active bookshelves, an easy way to change the enchantments offered is to disable bookshelves by placing torches between them and the enchanting table. That way one can still have the entire 'ring' of bookshelves around the table but get lower-level enchantments. Breaking the torches restores the effect of the bookshelves.
Bedrock Edition
With the layout shown here, enchantments with any number of bookshelves from 0 to 15 may be easily obtained:
Java Edition
With the layout shown here, enchantments with any number of bookshelves from 0 to 15 may be easily obtained:
Receivable enchantments
Enchanting seed
The Minecraft:enchantments that Minecraft:enchanting tables offer are determined using the enchanting seed that is stored under Template:Code in each player's data. After enchanting an item, the player's seed is regenerated, resulting in different enchantments.
This means enchanting tables with the same number of nearby bookshelves will offer the same enchantments for all items with the same enchantability and the same possible enchantments (same item-type or one of pickaxes, shovels or hoes) until an item is enchanted.
Initial seed
Template:Exclusive When joining a world for the first time, the seed is initialized to Template:Code, however when joining a world with an already present enchanting seed of Template:Code, it will be regenerated.<ref>Template:Bug</ref>
This meaning leaving and rejoining a world for the first time gives new enchantments without enchanting an item, and the first enchantment before ever leaving a world will always give the same enchantment for the same item-bookshelves-combination,
such as Minecraft:Looting III and Minecraft:Unbreaking III for a Minecraft:Netherite Sword with 15 bookshelves.
History
References
External links
- https://github.com/SeeYou-Man/Minecraft-Enchantment-Probabilities – A GitHub project currently in progress to calculate the probability to get specific enchantments, Feel free help out. Probability for 1.21 enchants are generated with 100k enchants for Item and material combo. Host your own server for now (Should work with a maybe 70+% functionality as of 22/11/2025 - SeeYouMan).
- https://web.archive.org/web/20181019012113/http://minecraftenchantmentcalculator.com/rev6/ (archived) – Tests enchantments by simulating probability of getting specific enchantments on a tool based on level and (optionally) the "clue" shown
- https://minecraft.tools/en/enchant.php – Provides some ability to test enchantments, although its interface is significantly less verbose on the specifics
- https://github.com/Earthcomputer/EnchantmentCracker – Cracks the XP seed and lets you choose the exact enchantments you want, though the process is highly tedious and error-prone. Deprecated in favor of clientcommands
Minecraft:cs:Princip očarování Minecraft:es:Mecánicas de encantamiento Minecraft:it:Meccaniche del tavolo per incantesimi Minecraft:ja:エンチャントの仕組み Minecraft:ko:마법 작동 원리 Minecraft:lzh:淬靈 Minecraft:pt:Mecânica de encantamento Minecraft:th:กลไกการร่ายมนตร์ Minecraft:zh:附魔(物品修饰)