Talk:Anvil Mechanics/Before 1.8

Hey all

I've done lots of testing on the anvils in snapshot 12w41b, and made a wiki page on it based on what people were telling me on Reddit and the forums. Feel free to change it and make it look better/make more sense (it's quite late here and I've not had much experience with making a wiki page, so I'm sure there's plenty of ways to make it better :))

Opaquer 15:29, 17 October 2012 (UTC)

Snapshot 12w42b repairing with resource
I've done some quick testing on the newest snapshot (12w42b) and found that when repairing an item with a resource, each resource will add 25% of the item's total durability (rounded down). Meaning, an item with durability 1561 (Diamond toos, diamond sword) will be repaired for 390 durability points for each diamond put in the anvil. –Preceding unsigned comment was added by 90.184.186.178 (Talk&#124;Contribs) 06:49, October 19, 2012‎ (UTC). Please sign your posts with

Any reason not to combine slot tables?
The page would gain readability if the "Slot 1" and"Slot 2" tables were merged into one 3-column table. --Mental Mouse 19:55, 24 October 2012 (UTC)

Changed format
I did as Mental Mouse suggested and changed the tables to a 3 column table instead. Let me know how it goes. Feel free to change the formatting.

Also, if anyone is up for helping figure out a formula that's more complete for items with no links, let me know through the forums (user opaquer). It would be greatly appreciated! Opaquer 12:36, 25 October 2012 (UTC)


 * Thanks! I'm probably going to shorten those headers.  I note that the text is incomplete and vague, e.g.  Cost for "having the item in the first slot"?   Discusses merging, but does that also apply to repair by adding materials?  For that matter, repair with materials isn't covered at all, nor is renaming.  (And does that work for bows?  What material?)  --Mental Mouse 11:48, 25 October 2012 (UTC)


 * All good! Please do change it to make it better; I was in a rush this morning when I did it. I had to go to a tute at 9AM, and 5 minutes before it started, I looked at the clock, realised what time it was, finished making it not be all over the place and hit submit :P. So I can imagine a lot of stuff is all over the place :P


 * As for the the repairing/renaming etc. I haven't yet figured out an easy way to work it out. If anyone is up for helping me figure this out, let me know! There are some formulas around that help with the merging, but I haven't had them working for anything other than what mine is, but they're a lot more complicated than my method. If anyone wants to help me though, let me know and we can work something out :) Opaquer 12:36, 25 October 2012 (UTC)

Different algorithm in final 1.4.2 release?
Either this set of tables is confusing to me, or flat-out wrong. On the new 1.4.2 release, I've been trying to combine tools using an anvil, and getting much higher costs than those listed.

Example 1: Diamond Pick 1 - Efficiency IV, Fortune III, barely used at all. Diamond Pick 2 - Unbreaking III, a bit less than half durability remaining.

Going by the rules and tables on the wiki, this should cost me: 5 levels for the pick in slot one having Efficiency IV. 13 levels for the pick in slot one having Fortune III. 1 level for the pick in slot one having two (one extra) enchantments. 2 levels for the pick in slot two having Unbreaking III. 0 levels for the pick in slot two having only one (no extra) enchantment. 21 total levels, right? So why does it cost more than 40 levels and produce the "too expensive" error?

Example 2: Diamond Pick 1 - Efficiency IV, Fortune III, barely used at all. Same as in example 1. Diamond Pick 2 -- Fortune III, worn down to a bare nub. Going by the rules and tables on the wiki, this should cost me: 5 levels for the pick in slot one having Efficiency IV. 13 levels for the pick in slot one having Fortune III. 1 level for the pick in slot one having two (one extra) enchantments. 4 levels for the pick in slot two having Fortune III. 0 levels for the pick in slot two having only one (no extra) enchantment. 23 total levels, right? So why does it cost 28 levels to get the resulting full-durability Eff4/Fort3 Pick?

The first example obviously isn't costing me 19+ levels for the repair, when the second example does more repair work and has only an extra 5 levels above that expected from the tables and formula. Even adding a few extra levels for the output pick having 3 enchantments rather than 2 can't explain 20 or more levels of difference.

Example 3: Diamond Pick 1: Efficiency IV, Fortune II, Unbreaking III, completely unused. Diamond Pick 3: Fortune III, worn down to a bare nub, same as in example 2. Going by the rules and tables on the wiki, this should cost me: 5 levels for the pick in slot one having Efficiency IV. 9 levels for the pick in slot one having Fortune III. 7 levels for the pick in slot one having Unbreaking III 3 levels for the pick in slot one having three (two extra) enchantments. 4 levels for the pick in slot two having Fortune III. 0 levels for the pick in slot two having only one (no extra) enchantment. 28 total levels, right? So why does it cost 33 levels to get the expected Eff4/Fort3/Unbr3 Pick? 39 if I also want to rename it. That's six levels to name it, not five as the Anvil article states. I didn't try renaming on the other examples.

That's three examples I've tried, and none of them produce the expected cost. What am I doing wrong, or has the algorithm changed? 99.141.53.167 04:42, 26 October 2012 (UTC)


 * Hey! So, with the mechanics. This is for combining two items that have a common item between them and haven't been used at all. For repairing, the costs are more. Unfortunately, I haven't been able to find out the formula for repairing items yet, or combining things that have no common links between then :(. Still trying though. That said, if anyone wants to help, please do :) Opaquer 12:14, 26 October 2012 (UTC)

Partial cleanup, need help.
I've cleaned up the article based on what was there, but the original text was inconsistent, doesn't completely match the tables, and the combination doesn't seem to work right. Notably, the tables suggest that putting the higher enchanted item in the first slot would not be cheaper, and that it would be much cheaper to add, say, Fortune III to Unbreaking I than vice versa. These are my guesses for what it "should" say, but not having tested anything (much less read the source), I'm wary of putting them in without confirmation: --Mental Mouse 13:11, 26 October 2012 (UTC)
 * 1) The "First slot" cost applies to the final item, not the target item.
 * 2) The "Second slot" cost is constant for each enchantment type that's in the "sacrificed" item, but is halved (only) if maxed-out and combining with a matching enchantment.  One big question is if you pay for an enchantment that doesn't make it into the target item at all (Smite over Sharpness), or is masked (Smite I over Smite II) -- my guess is yes.  I'm now thinking that suggesting the slot tables be combined may have been a mistake on my part -- if so, the second slot should get a separate, much shorter, table.)
 * 3) I don't know whether straight "repairs" (say, by adding diamonds) count as "going through the anvil" for the penalty.
 * 4) Similarly, I don't know if "lost" enchantments as above stay in the result's "running cost".
 * 5) ETA:  Also, it'd be nice to know the penalties for using damaged items.


 * Hey! So:
 * What do you mean?
 * I agree with what you said: Adding a knockback 2 enchant with another item that has knockback 2 will only add an extra 2 levels. Is that what you mean? Also, I too suspect that you pay for enchants that don't make it through (in cases like smite over sharpness, you would still pay for the sharpness). As for, say, smite 3 over smite 1, I think it costs the same as smite 3, but gives the final sword a smite 3, and ignored the smite 1. Someone would have to check though
 * I highly suspect anything that comes out of the anvil's output slot will still get the +2 level penalty
 * A very good question indeed! We shall have to test it!
 * That too is a very good point. I probably won't have much time this week because of uni, but I'm more than happy to talk about it and try work out numbers. Do you have an account on the forums so we can talk to each other directly if need be rather than keep editing this page :P?

Opaquer 02:39, 27 October 2012 (UTC)

Some repair costs
So far I've gotten: Unenchanted items cost 1 for each unit of material used to repair them. Enchanted items cost more: My worn-down Smite II diamond sword would cost 9, 13, or 16 for 1, 2, or 3 diamonds worth of repair. A slightly better-off Knockback II sword would cost 9, 13, or 15. I wonder if that's a discount for not repairing very much with the last one....  Repairing a worn-down iron sword cost 1 for the first ingot, but would have 3 for the second, or 4 for two on the second repair. So, it looks like repair does give the 2-level penalty. ETA: Neither string nor sticks can be used to repair a bow, but you can combine it with a normal one. My Power 4 Punch 2 bow would cost 19 levels to do that. --Mental Mouse 01:47, 27 October 2012 (UTC)


 * 9, 13 or 16 makes a nice pattern of adding 4 each diamond. 9, 13 or 15 doesn't though. I think we need more exact data: Exactly how many uses for each item, how many diamonds, and differences between tiers. As for bows, perhaps there's no way to repair them. That's slightly annoying :( Opaquer 02:55, 27 October 2012 (UTC)
 * Well, combining an enchanted bow with a normal one has the same basic effect in one step, and a plain bow is pretty cheap. I'll note too that repairing unenchanted items with diamonds or ingots is a bargain for armour, not so much for unenchanted tools or swords. --Mental Mouse 15:27, 27 October 2012 (UTC)


 * That's true for the bows. The question is, how does putting a normal bow in with an enchanted bow compare to putting materials in with items? Opaquer 22:26, 27 October 2012 (UTC)

New costs
Hey guys

I might have just found out something that could be quite helpful. As such, I'm going to change the costs. The mechanics have not changed. But I'm just 'rescaling' the costs essentially. It just makes formulas quite a lot easier. Again: nothing else has changed! That said, some of the text might be a little out of date, probably about how the extra enchants. If it is, change it, because I probably missed it :) Opaquer 02:55, 27 October 2012 (UTC)

Update: Alright guys, stuff has been changed. I've also added a new section with the formulas, since some people would prefer formulas to tables. I couldn't quite figure out how to do math symbols, but if there's a way, it might make a bit more sense using a sum instead of how I have it now, unless people think it makes sense as is? Opaquer 04:09, 27 October 2012 (UTC)


 * Using a sigma would be a bit much, remember we've got 12-year olds about. The formula as seen is not rendering well on my system, I may see if I can make it look better.  That new section could actually replace the long tables, if you're confident in your results.  Also, I'd still like to know how those costs relate to repairing single items. --Mental Mouse 15:28, 27 October 2012 (UTC)


 * I would love to use a sigma, but I couldn't get the wiki to like me enough to make it work for me :P. If you can get math to work, that would be amazing! And yup, the results are exactly the same as the tables before, just 'scaled' differently so that you have those formulas instead of weird (2n+1) type things which might get confusing for those who don't like math as much as me :P. For the costs of repairing, I don't know when I'll get much of a chance to get on next and test it. I've sort of ignored my PhD for a week and a bit, and now I've got to catch up :P. But if you're up for doing the testing and need a second pair of eyes, I am more than happy to be that pair :P Opaquer 15:31, 27 October 2012 (UTC)