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)

Math symbols and formula format
Found a hidden comment without a signature. Next time just post on the Talk page instead of using hidden comments. This way everyone will be able to see them regardless if they decide to edit/view the source or not. --M0rphzone(talk) 23:17, 27 October 2012 (UTC)


 * That hidden comment was me, sorry. Forgot about signing it, sorry. But I put it there instead because someone edited the wiki to say "This is not correct", so I made the hidden comment in case they decided to edit it again and didn't look at the talk page. Opaquer 11:24, 28 October 2012 (UTC)

"I have no idea how to type math in the wiki, so if there is a way and someone knows it, could you please fix this up to make it look better somehow :)?" Check Wikipedia for how they do it, and they might use some templates which you could use here as well. --M0rphzone(talk) 23:17, 27 October 2012 (UTC)


 * I did that. I tried using what wiki used for the sums and stuff, and it didn't work. Hence why I've had trouble with this. Unless there's something I'm missing (I'm not someone who makes wiki pages often, so that's certainly a possibility) Opaquer 11:24, 28 October 2012 (UTC)
 * I still think we should be using English text rather than a sigma: "For each enchantment, add in...".Lots of folks would just go WTF at a sigma, and in a case like this, it's just showing off.  --Mental Mouse 19:50, 28 October 2012 (UTC)


 * Yeah, that's why once I couldn't get it to work I gave up :P. Though, the mathematical part of me is really wishing there was a sigma there :P Opaquer 00:33, 29 October 2012 (UTC)

Great, but...
Tis is a great article, but it seems out of place for a tutorial. Mabey it could be placed similarly to the way that echanting has This article? It is a useful and detailed article, but not a tutorial. I am also not a fan of how it is in the enchanting section of the tutorial page, while their is no page on enchanting there. Pokechu22 00:14, 30 October 2012 (UTC)


 * It used to be like that article, and then someone changed it to be a tutorial :S. I'm not entirely sure what exactly they did to change it though, but if enough people don't think it should be a tutorial, I'm sure it can be changed back :) Opaquer 00:38, 30 October 2012 (UTC)
 * I agree, it should be a regular article. We do need more complete information, especially figuring out the materials-repair thing. --Mental Mouse 02:25, 30 October 2012 (UTC)


 * Agreed; the technical information here has more in common with the pages on file formats than the other tutorial how-to guides. -- Orthotope 05:27, 2 November 2012 (UTC)

Order of enchantments
Just to clarify it to people, the order of enchantments on a single item does not matter. A sword in the first slot that has Sharpness 4 and looting 3 will cost 19 levels, while swapping the order of the enchantments (to have a sword with looting 3, sharpness 4) will still cost 19 levels. That is not the same as saying a sharpness 4 sword in the left slot + a looting 3 sword in the right slot will cost the same if you swap the order around. Opaquer 23:04, 30 October 2012 (UTC)

Move page
Hey all. I moved the topic back to just Anvil Mechanics, not under tutorial any more Opaquer 09:02, 2 November 2012 (UTC)
 * Thanks! --Mental Mouse 12:37, 2 November 2012 (UTC)

Anvils and raw materials
Hi. i just did a little research on raw material repairing. I don't personally understand anvils that well and I have little experience on wikis but I'll post my findings here anyway.

Note: this research was done using golden pickaxes

Firstly, you can repair an item with multiple pieces of the raw material at once.

Secondly, the item WILL face the previously-combined penalty each time it is repaired with raw materials, though it will only face this penalty once even if multiple pieces of material are used.

Thirdly, repairing with raw material will cost enchantment levels. As i stated earlier, I don't understand anvils that well so I'll just post 3 separate cases with golden pickaxes:

1: Unenchanted pickaxe: Costs 1 level per ingot to repair. 2: Pickaxe with Efficiency III: Costs 4 levels + 2 levels per ingot used to repair (I.E 6 if 1 ingot was used, 8 if 2 are used etc). 3: Pickaxe with unbreaking III; Efficiency III: Costs 12 levels + 3 levels per ingot

Another thing i found was that if an item is stackable, then you can rename multiple pieces of that item at once. It costs 5 levels per item, But the cost is capped at 39. This means you can enchant an entire stack of blocks for 39 levels.

109.77.199.229 12:56, 3 November 2012 (UTC)Elektromag109.77.199.229 12:56, 3 November 2012 (UTC)

New Table layout
Hey all. Are we all OK with how the new tables are being changed under the formulas section? I think personally I'd prefer to have the increment values there, but that's just me? Opaquer 17:29, 3 November 2012 (UTC)
 * Wait what? Some nameless IP deleted the whole column without giving a reason, replacement, or justification?  Not changing the text, thus leaving orphaned references to increments and the second column, is also a hint this is vandalism.  No, this is not cool.   I'm reverting. --Mental Mouse 18:51, 3 November 2012 (UTC)
 * Despite my reflexive response above, it does seem that the increments are always the same as the base cost. Perhaps we should in fact combine the tables into one with 3 columns: "enchantment name", "1st slot per level", "2nd slot".  (And a note that the second slot costs half when combining maxed out enchantments).  Having an entry for every enchantment level makes excessively long tables.
 * (A tip for future editors: Even a proper change comment would have blunted my "revert vandalism" reaction; asking in this here talk page first, would have been much better.)

--Mental Mouse 23:41, 5 November 2012 (UTC)

Some research:
Got some interesting findings with gold swords (1.4.3): Anyone want to confirm these, perhaps with some armour? --Mental Mouse 23:07, 5 November 2012 (UTC)
 * The cost of repair with materials is the item's base cost plus a per-ingot cost, which does not vary with the damage to the sword -- you just need more ingots for a heavily-damaged sword. I believe the per-ingot cost is 1 plus the number of enchantments (regardless of level).
 * When repairing an enchanted sword with a plain one, the damage of the plain one does not affect the cost. Also, doing this will be cheaper in levels than even the one-ingot cost for repairing with materials.  The cost appears to be the base cost plus 1.
 * ETA: When combining two enchanted swords, that "plus 1" penalty appears and disappears, I haven't quite nailed down what the rules are.
 * ETA2: When repairing a sword with a "subset" sword (that is, the target sword will not change its enchantments), it costs the same as with a plain sword.
 * I would love to test that! Unfortunately, I'm at uni all day and I can't get Minecraft on my uni computer D:. Perhaps tonight when I get home if I've got time. Also, with the combining of two enchanted swords: If you've read my forum/reddit post, you'll know I tried some theories as to how to calculate the cost of combining two enchanted swords without common links, and some got very close to working. I had that same problem. I found a way to make it work, tested in on 5 swords, and it worked perfectly. Then I tried on one more to be 100% sure, and I was missing 1 level. Couldn't figure out where. Kept trying, and I was always correct or 1 level short. Still haven't figured out why this happens or where that level comes from :(. Opaquer 00:37, 6 November 2012 (UTC)
 * Hmm, I just realized the rule I had for material repair is not consistent with my prior experiments on diamond swords, where single-enchantment items had a per-ingot cost of 4. Sigh...   Opaquer:  Were you getting different costs for identical combinations?  If so, you should probably report that as a likely bug. --Mental Mouse 02:04, 6 November 2012 (UTC)
 * Hmm. Maybe each tier has a different cost? So, fixing diamond stuff costs more than gold stuff? And how so for the different costs for identical combinations? As in, did I find that to combine a sharpness 4 with a looting 3 cost however many levels, but getting the same thing a different way cost differently? Well, it depends on how the swords are, but for the most part, no. What I meant was that in one of my theories to calculate the exact cost needed to combine enchantments, sometimes I also had the plus 1 penalty appearing and disappearing, and I too couldn't figure out why or what was causing it :(. Opaquer 02:09, 6 November 2012 (UTC)
 * I was asking whether you'd ever combined the identical set of items (say, Sharpness 2+Fire and Sharpness 2) in the same order, and gotten two different costs. [text moved to new section]
 * Dunno how much more I'll be able to do tonight, but... weird. --Mental Mouse 02:49, 6 November 2012 (UTC)

Diamond swords
Moved from the previous section for readability:

Early experiments with diamonds are bizarre. With plain diamond swords, I'm getting 2+1/diamond for repair... but combining a damaged one with a whole one costs 17 levels, and combining two damaged swords, only 13! And it gets worse: A damaged Bane 1 sword costs 20 to repair with a whole sword, but only 16 with a damaged one. For a Bane II sword, that's 22 and 18. It also costs 18 to repair the Bane 2 sword with the Bane 1 one (both damaged). Repairing them with diamonds costs 5+2/unit and 7+2/unit respectively. (In all cases I'm assuming the unit costs are in fact constant; it was hard enough wearing my "mother sword" down below 75%.)


 * Blarg. This is getting annoying. The talk page keeps changing as I'm trying to edit it, and when I go to submit it, it deletes what I've typed :(. Third time lucky hopefully.
 * I never got different level costs from two identical enchantments. Just one of my theories that almost worked, the plus 1 penalty also kept appearing and disappearing for me, and I couldn't quite figure it out :(. For the diamond stuff, is it a total of 3 levels/diamond to repair? Also, with the bane stuff, what do you mean by 'but only 16 with a damaged one'? Do you mean that if you had a damaged bane 1 in the first slot, you put a plain whole one in the second and it cost 20 levels, but when you put a plain damaged one it only cost 16? Or were the whole and damaged ones in the second slot also enchanted with bane? Either way, the difference between bane 1 and bane 2 is only 2 levels, which is the cost of the increment of bane anyway. That's a good start. Also, the difference between using an undamaged sword and a damaged one is 4 levels, the cost of bane if it's put into the second slot. Not sure if that's true for all things though, or if it's just a constant 4 levels. I'd be willing to say that smite will have the same values here though. If you check that, try something else out: get a different enchantment, like sharpness 3 or something, and try repair it. See if adding the whole sword costs an extra 2 levels (cost of it being in the second slot) compared to a damaged sword.
 * I'm just guessing here though. With only 1 set of data, it's kinda hard to get anything for certain :P. Opaquer 03:17, 6 November 2012 (UTC)

Sorry about the changing page, I kept finding new stuff. No, repairing the plain diamond sword cost 3 for one ingots, 4 for 2 ingots, and presumably etc. That's 2 extra compared to the gold costs. Adding diamonds to the Bane swords likewise cost 2 levels more than expected. The real shocker is the sword-on-sword costs -- Even if there's a cost dependent on damage, I would not expect using a damaged sword to be cheaper. The cost for combining two damaged plain swords is 13 (12 more than expected), and using a whole sword on a damaged one mysteriously adds another 4.

Given this, the Bane repair costs are as expected:
 * Combining the Bane swords with damaged plain ones, adds the cost of the Bane swords.
 * Combining the Bane 1 sword onto the Bane 2 one costs the same as repairing the Bane 2 one with a plain sword.
 * Repairing the Bane swords with diamonds adds the cost of the Bane swords, and 1/unit for a single enchantment.

Next I think I'll try enchanting some intact swords and further damaging another "blank" sword. These experimental entries are getting long... should I perhaps be moving these experiments to my own userspace? --Mental Mouse 11:23, 6 November 2012 (UTC)
 * Hmm. Sounds like it's going quite well. What's your method of damaging the swords quickly? I might be able to join you soon, but won't have a long time to damage the swords down :(. Also, if you want to send me the data so I can have a look over it too, I would be happy to. If so, is there some way to send stuff over the wiki, or you want to talk on the forums/reddit or something? Let me know though, I love looking at data (you should see my original spreadsheet for the anvil data stuff :P). Opaquer 11:27, 6 November 2012 (UTC)


 * I'm using /gamemode to go to survival, then swinging at dirt blocks. I just started using F3+H to get durability values.  Most of my data is scrawled onto graph paper, but I can probably type it in over at my own userspace.  Newest findings:  unit repair for diamond swords costs up to 3 levels per unit, depending on the durability gained with that unit.  The third unit goes from 1 at durability 595 (up to 777 or more), to 2 around 573, and 3 around 479.  None of these are exact, I was testing at intervals while beating down the sword. --Mental Mouse 13:36, 6 November 2012 (UTC)
 * Hmm... Fair enough. So you're saying that it could be that less than 1/3 durability, it costs 3 diamonds, between 1/3 and 2/3, it costs 2 diamonds, and above that, it costs 1 diamond? --Opaquer
 * Or rather, 1/12 of the entire durability (four units, each costing up to 3 levels). I'm about to test a transition point on that.  Another note on methods:  In creative mode, you can use frames and "pick block" to duplicate a damaged weapon.  Doesn't seem to copy enchantments, though.  :-( --Mental Mouse 13:45, 6 November 2012 (UTC)
 * The pick block in frames is amazing. It's how I made so many items to enchant for the first anvil tests :P. So, at 1/12th the durability, you're saying it'll cost 12 levels to fully repair? Not quite sure if I'm getting it right :(. Kinda tired :(. Opaquer 13:48, 6 November 2012 (UTC)
 * Right, if it's worn down to a nubbin. Latest findings:  For the first ingot, the cost changes from 1 level to 2, between durability 1371 and 1361.  That's a little awkward -- it could be half-way between the twelfths (that is, rounding to the nearest twelfth). --Mental Mouse 14:08, 6 November 2012 (UTC)
 * Hmm. That's a really weird number :S. That's around 10.5/12. Maybe it's split into 24 segments, and that would relate to the 21st segment out of the 24, and every second odd one, the cost changes? 21/24 makes me happier than 10.5/12 :P. Opaquer 14:14, 6 November 2012 (UTC)
 * Yeah, that's equivalent to the rounding. But the next transition happened between 1280 and 1251, which has distinctly high for that pattern (should be 1235).  :-(  --Mental Mouse 14:34, 6 November 2012 (UTC)
 * So it is D:. Those are some odd numbers then D:? Might certainly have to do more testing, maybe with other materials too. I doubt golden swords will be split up into 24 sections too :P. Opaquer 15:04, 6 November 2012 (UTC)

I've taken my ongoing notes over to my userspace. --Mental Mouse 21:05, 6 November 2012 (UTC)

Renaming
Renamed items are exempt from increasing repair costs. I've heard it also resets the costs for items that have already been repaired. Someone might want to fit that information somewhere on the page. 173.60.208.179 02:50, 9 November 2012 (UTC)