Prior work penalty — the hidden price of every anvil use
Every time an item passes through an anvil, it gains a work counter. The penalty is 2ⁿ − 1 for n uses, and it's charged again on every later operation — which is why the order you combine books in decides whether your plan is affordable.
The table
| Anvil uses | Penalty |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 3 |
| 3 | 7 |
| 4 | 15 |
| 5 | 31 |
| 6 | 63 |
A book straight from a librarian has 0 uses. Merge it once and the result has 1. Six sequential merges put the item at 6 uses — penalty 63 on the final operation alone, which by itself blows past the 39-level cap.
The max-plus-one rule (the whole trick)
When two items merge, the result's counter is the higher of the two, plus one — not the sum. So a balanced tree stays shallow: books at 0 merge into items at 1, those merge into items at 2, then 3. With six books you finish at 3 uses (penalty 7) instead of 6 (penalty 63).
This is why "pair them up" is the folk wisdom — and also why it's incomplete.
Why pairing blindly isn't always optimal
Balanced pairing keeps penalties low but can charge an expensive enchantment's multiplier twice: if a 4× enchantment passes through two merges on the sacrifice side, you pay 4 × level twice. A mixed strategy — one unbalanced merge that avoids re-transferring an expensive enchantment — can beat the fully balanced tree. The Wiki's own worked example: naive full pairing costs 68 levels; a smarter plan costs 66.
Differences that small are exactly why you want enumeration rather than a rule of thumb. Our calculator walks every tree and orientation within the book budget and returns the true minimum.
Resetting penalties
A grindstone strips enchantments but doesn't rewind the counter on the item you keep. Practical consequences:
- You can't "clean" an item repeatedly to dodge penalties — start from a fresh item when the plan demands it.
- Renaming is cheapest during a merge you were already doing (+1), not as its own operation.
- Repair with Mending rather than the anvil's repair mode (+2) so you don't add uses for nothing.
Practical checklist
- Collect all books first, then plan once — replanning mid-way usually means starting a new base item.
- Put 1× enchantments (Sharpness, Efficiency, Protection, Power, Unbreaking) on the sacrifice side when in doubt.
- Check the per-step costs, not just the total: one 40-level step fails the whole plan.
- If the planner says every order exceeds 39, split into two items or drop a level.