-
Bug
-
Resolution: Unresolved
-
None
-
24w18a, 1.21 Release Candidate 1, 1.21, 24w33a, 1.21.1 Release Candidate 1, 1.21.1, 24w34a, 24w35a, 24w36a, 24w37a, 24w38a, 24w39a, 24w40a, 1.21.2 Pre-Release 1, 1.21.2 Pre-Release 2, 1.21.2 Pre-Release 3, 1.21.2 Pre-Release 4, 1.21.2 Pre-Release 5, 1.21.2 Release Candidate 1, 1.21.2 Release Candidate 2, 1.21.2, 24w44a, 1.21.3, 24w45a, 24w46a, 1.21.4 Pre-Release 1, 1.21.4 Pre-Release 2, 1.21.4 Pre-Release 3, 1.21.4 Release Candidate 1, 1.21.4 Release Candidate 3, 1.21.4
-
None
-
Confirmed
-
Enchantments
-
Normal
-
Platform
The Bug
Introduced in 24w18a.
Enchanting a Mace in an Enchanting Table may sometimes show enchantments that cannot be clicked. This usually happens with lower-level enchantments. Hovering over these unavailable enchantments does not display the hover text as it would normally. Clicking on these also does nothing.
This issue can rarely happen when having the full 15 bookshelves around the Enchanting Table, however, only the first option is usually bugged.
Cause
What seems to cause the issue is that all of the enchantments obtainable from an Enchanting Table have at least a minimum cost of 5. The game automatically assigns an enchanting level to all three slots using a different formula* based on the number of bookshelves around it. The results of these formulas may not meet the minimum requirements of the enchantment, especially if there are little to no bookshelves around the table.
According to the vanilla datapack**, the minimum cost required for each enchantment when enchanting the Mace in an Enchanting Table is:
Enchantment Name | Minimum Cost |
---|---|
Unbreaking | 5 |
Density | 5 |
Breach | 15 |
Note that other enchantments compatible with Maces (e.g. Mending, Wind Burst, Smite, etc.) cannot be obtained from the Enchanting Table.
Since this issue was introduced in 24w18a, this is likely due to the changes to enchantments introduced in the same snapshot.
Steps to Reproduce
It works in Survival mode, but you need experience levels and lapis lazuli.
- Place down an Enchanting Table, and get a bunch of Maces.
- Start enchanting each Mace in Creative mode until you see an option you cannot click on (it will usually be the first or second option).
Sometimes, it can be impossible to enchant a Mace without refreshing the enchantments by enchanting another item.
Additional Notes
Related to MC-36937 (similar issue but with Fishing Rods).
First Note *
The method EnchantmentHelper#calculateRequiredExperienceLevel most likely defines the formula used.
Second Note **
Found by reading the JSON files in the 1.21 Release Candidate 1 .jar file using 7-Zip (in the directory /data/minecraft/enchantment of the archived jar).
In the respective enchantment's JSON file, this is the part that most likely defines the minimum cost:
"min_cost": { "base": 5, // This defines the minimum cost "per_level_above_first": 8 },
The value varies between enchantments (for example, Aqua Affinity's minimum cost is 1).