Repository navigation
Where Enchantments Appear
Your enchantments appear in the game in the same places as vanilla ones, because they are part of the game's own enchantment system. This page explains how to control it.
The obtain option of an enchantment (or of a rarity) turns each place on or off:
obtain:
enchanting-table: true
villagers: true
loot: true
fishing: true
mob-equipment: false
traded-equipment: false| Place | What it means |
|---|---|
enchanting-table |
It can be one of the options when a player enchants an item at an enchanting table. |
villagers |
Librarian villagers can sell enchanted books with it, in every kind of village. |
loot |
It can show up in the chests found in structures. It no longer includes fishing. |
fishing |
Fishing treasure only. If neither the rarity nor the enchantment writes it, fishing follows the final loot value. Use loot: false with fishing: true to have it only when fishing. |
mob-equipment |
Mobs that spawn wearing or holding enchanted gear can have it. With a chance, each piece of MetaEnchants equipment keeps it only that often; the mob may end up with no enchantment on that piece. |
traded-equipment |
Villagers that sell enchanted gear (like armorers and toolsmiths) can sell items with it. With a chance, each traded piece keeps it only that often. If nothing is left, the item is replaced with a random vanilla enchantment. |
All of the places are true unless the rarity says otherwise. Anything you do not write keeps the value of the rarity.
Even if a place is on, the enchantment only shows up on items it supports (see Items, Slots and Incompatibilities), and never together with an incompatible enchantment.
Each place can be true, false or a chance:
obtain:
enchanting-table: 25%
villagers: true
loot: 50%
fishing: 10%
mob-equipment: 25%
traded-equipment: 10%The game rolls enchantments as usual, and then a MetaEnchants enchantment that came up is only kept with that chance. With enchanting-table: 25%, three out of four times the table leaves it out of the result. The same roll happens on mob equipment and on traded equipment: each piece keeps the enchantment only that often.
What happens when an enchantment is left out:
| Place | Then... |
|---|---|
enchanting-table |
The item gets the other enchantments of the roll. If none are left, it gets one anyway, so the player never pays for nothing. |
villagers |
The book of the trade gets a random vanilla enchantment instead. |
loot, fishing
|
The item loses that enchantment. If nothing is left, a random vanilla enchantment is added instead. |
mob-equipment |
The piece loses that enchantment. Unlike the other places, it is not replaced: vanilla also spawns mobs with plain equipment. |
traded-equipment |
The piece loses that enchantment. If nothing is left, it is replaced with a random vanilla one so the trade stays useful. |
All six places accept true, false and a chance.
fishing is special: it shares the game's random loot list with loot, but keeps its own chance. An explicit fishing in the enchantment wins over the rarity, and either of them wins over the inheritance. If neither declares it, fishing follows the final loot value after merging the rarity and the enchantment. For example, a rarity with loot: 50% and an enchantment with loot: 100% gives fishing 100%; a rarity with fishing: 40% keeps 40% even if the enchantment raises loot; writing fishing: false disables it even when loot is on.
Chances can be written in the rarity too, and the enchantment can change them. Changing a chance between 1% and 100% only needs /metaenchants reload. Changing a place to or from false (or 0%) needs a restart, because it adds or removes the enchantment from the game's own lists.
minimum-table-level: 20The enchanting table only gives this enchantment when the player pays at least this many levels (the number on the button, up to 30). It is a simple way to keep strong enchantments away from weak tables. It can also be set in the rarity. 0 (the default) allows any level. Reloads with /metaenchants reload.
config.yml can make the enchanting table give fewer enchantments, for every item:
enchanting-table:
max-enchants: 3
reduction: 30| Option | What it does |
|---|---|
max-enchants |
The most enchantments one roll gives. 0 keeps vanilla. |
reduction |
A chance from 0 to 100 to leave out each enchantment after the first one. 30 means every extra enchantment has a 30% chance to be dropped. |
The type of an enchantment can also make the table give lower levels.
treasure: true is for special enchantments, like Mending:
- They never appear in the enchanting table, even if
enchanting-tableistrue. - Villagers charge double for books with them.
- They can still be found in loot, fishing and trades, so players can discover them.
weight is how likely the enchantment is when the game picks among all the enchantments that fit an item. It is relative: only the comparison with the others matters.
The vanilla numbers are a good guide:
| Weight | Feels like |
|---|---|
| 10 | Very common (Sharpness, Protection). |
| 5 | Common. |
| 2 | Uncommon. |
| 1 | Very rare (Thorns, Curse of Binding). |
The maximum is 1024. A huge weight makes the enchantment appear nearly every time, so use it carefully.
The enchanting table has three options with a power (shown as the level number on each button, up to 30; more bookshelves means a higher power). For each enchantment, the table checks if the power falls inside the range that the enchantment accepts for each of its levels.
-
min-costis the lowest power at which each level can be offered. -
max-costis the highest power at which each level can be offered.
Each has a base (the number for level 1) and a per-level (what is added for every level above 1):
min-cost: { base: 10, per-level: 8 }
max-cost: { base: 40, per-level: 8 }| Level | Offered when the power is... |
|---|---|
| 1 | between 10 and 40 |
| 2 | between 18 and 48 |
| 3 | between 26 and 56 |
So with those numbers, level 3 needs a power of at least 26: you only see it on strong tables. A table with power 12 can offer level 1, but not levels 2 or 3.
Rules of thumb:
- To make high levels harder to get, increase
per-levelinmin-cost. - To make an enchantment appear earlier, lower the
baseofmin-cost. - Keep
max-costbigger thanmin-cost, or the enchantment will never be offered.
The default numbers from each rarity are a safe starting point.
anvil-cost is how much experience it costs to combine this enchantment at an anvil. Higher values make it more expensive. Rare enchantments usually cost more (the included rarities go from 1 to 8).
The settings on this page do not limit commands. Operators can give books with /metaenchants give and force levels with /forceenchant; the game still checks item support and incompatibility for /enchant and /forceenchant. See Commands and Permissions.
- To test the table, go to a table with 15 bookshelves, put a diamond sword in it and look at the three offers.
- To test villagers, create a new librarian (place a lectern next to an unemployed villager) and look at the books it sells.
- To test loot, explore a few chests or use a loot-related command of your server.
Because these are random, testing them takes patience. If you need a guaranteed result, use /metaenchants give or /enchant.