Mechanic
Enchantment Costs
Enchantment weight, book transfer cost, and prior-work penalties in Java 26.2.

Quick answer
Enchantment weight, book transfer cost, and prior-work penalties in Java 26.2.
Operation limitUp to 39 levels in Survival
SourceVanilla datapack
Prior-work penalty0, 1, 3, 7, 15…
OptimizationBalanced book combining
Enchantment cost
Each enchantment has an anvil_cost. Book transfer uses half, rounded down with a minimum of 1, multiplied by level.
Prior-work penalty
After operations, the prior-work penalty grows as 0, 1, 3, 7, 15, 31, and so on.
Book order
Applying every book directly grows the item penalty too quickly; a balanced merge tree is usually cheaper.
Too Expensive
An operation costing 40 levels or more is blocked in ordinary Survival even if the player has enough levels.


