[MC-1907] Mutiplayer: Repairing Tools with an Anvil doesn't work Created: 02/Nov/12  Updated: 07/Sep/15  Resolved: 18/Apr/13

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.2, Minecraft 1.4.5, Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w01a, Snapshot 13w01b, Minecraft 1.5, Minecraft 1.5.1
Fix Version/s: None

Type: Bug
Reporter: ilevelin Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 35
Labels: item

Issue Links:
Duplicate
is duplicated by MC-5327 Anvil Interaction Not Working correctly. Resolved
is duplicated by MC-5479 Enchantment Books Resolved
is duplicated by MC-5678 When combining tools with enchanted b... Resolved
is duplicated by MC-6560 Lost XP in anvil Resolved
is duplicated by MC-7459 Can't add Thorns III Resolved
is duplicated by MC-9649 attempted to use a silk touch 1 book ... Resolved
is duplicated by MC-12604 Enchanting Chain Armor Resolved
is duplicated by MC-12644 Anvil repairing enchanted gear with n... Resolved
is duplicated by MC-12716 Enchanted Books won't combine. Resolved
is duplicated by MC-12778 Enchantment Books, combining them Resolved
is duplicated by MC-12817 enchanted books disappear in anvil Resolved
is duplicated by MC-12948 When combining like enchanted books t... Resolved
is duplicated by MC-13362 Enchanted books of equal level not cr... Resolved
is duplicated by MC-13449 Combining enchanted books does not wo... Resolved
is duplicated by MC-808 Anvil leather pants bug Resolved
is duplicated by MC-1639 anvil item dup bug Resolved
is duplicated by MC-2000 Repairing Tools with an Anvil doesn't... Resolved
is duplicated by MC-2644 Anvils appears to merge items but doe... Resolved
is duplicated by MC-3134 Anvil: combine does not work (lvl 39) Resolved
is duplicated by MC-4045 Anvil repair bug - level cost raised,... Resolved
is duplicated by MC-4064 Minecraft Anvil Bug on servers Resolved
is duplicated by MC-4204 The Anvil suks more exp than it shoul... Resolved
CHK:
Confirmation Status: Community Consensus

 Description   

When you try to repair in anvil with the base material(example: Iron Helmet with Iron Ingot) the item isn't repaired, the anvil return you the base material, the item and you lose exp.

STEPS TO REPRODUCE:
1.insert a tool and the items to repair it
2.shift+right click or left click to repaired item (the anvil reset and you loses exp)

I think is an important bug, please repair it.
Thanks for read it
------------------------------------------------------------------------------------------------------
I FINDED THE REAL PROBLEM:
The anvil say you an experience cost (example, 3lvl) but the sistem use more experience (example, 12lvl).
I finded it when i tried to repair a iron pants with other iron pants. The anvil say me "experience cost 1" but when I repaired it, it used more than 10lvl.

I want make a video soon.



 Comments   
Comment by ilevelin [ 12/Aug/15 ]

Please stop commenting here. This bug is from 1.4 version of minecraft, while i was playing in VANILLA server hosted by MYSELF and playing with firends. What you are posting are bugs of 1.7 bukkit (or similar) servers played from 1.8. I experimented that bug and i solved it playing in 1.7.
Also, as you can se, this bug is solved. So, if you think this should be reopen, open another post and try, but mojang will do nothing with a bug of a non-mojang api.

Regrats

Comment by MCgg [ 09/Aug/15 ]

I had this problem on multiple servers, but not only to "repair". it is hard to explain. I leave a video of the problem.

summary of the problem.
https://www.youtube.com/watch?v=4ti5_v2DKaI

example (m 8:30):
https://youtu.be/ogM9BdiSlVo?t=510

Rarely happens in single player as well, but is very rare.

Please open this bug

Comment by EvilSeph (Warren Loo) [ 18/Apr/13 ]

We're unable to reproduce this bug given the various steps to reproduce provided by the OP and in the comments. As this ticket is simply regarding "repairing tools with an anvil" not working in Multiplayer, this ticket is invalid.

Looking into this, it looks like the repairing issue is directly related to using a non-default language when connected to a Multiplayer server. As such, MC-1123 is better suited for tracking this bug.

Comment by Jokke Pappa [ 03/Apr/13 ]

I think this may have something to do with anvils breaking. I cannot use old anvils but when i created new one it works again with it.

Going to try to reproduce it this way soon.

Comment by Matias Heiberg Andersen [ 03/Apr/13 ]

This bug still excist in 1.5.1. I have had problems combining 2 enchanted books. As described above, the anvil restets but still fee you x amount of XP.

Comment by Tails [ 15/Mar/13 ]

The language bug is already reported in MC-1123.

Comment by Aikar [ 15/Mar/13 ]

Yes I just looked at 1.5.1 client and server code, still has the problem.

public String getItemDisplayName(ItemStack par1ItemStack)

{ return ("" + StringTranslate.getInstance().translateNamedKey(this.getLocalizedName(par1ItemStack))).trim(); }

It's using getItemDisplayName to fill in the input box for the anvil window, but when user is using non english language, this text will differ from the server and will be considered a rename.

simple steps to reproduce:
Switch to pirate language
put redstone lamp in anvil, do not type a name
youll notice it lists the item immediately as processable by the anvil. this is due to rename.

if you switch to english, item will not be processible.

client simply needs to check english name != current typed name before sending MC|ItemName custom channel in GuiRepair:sendSlotContents

Comment by Tails [ 15/Mar/13 ]

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Comment by Kimitsu Desu [ 30/Jan/13 ]

Happened on my server. Server's default language is English, but if someone connects with another language selected for their client, the server thinks that they try not only to combine but also to rename items, and requests more XP levels than client thinks it needs, which results in this bug. Workaround is to have player to temorarily use English(US) language while using an anvil.

Comment by Aikar [ 28/Jan/13 ]

Lewis, book issue was a craftbukkit issue specifically which is now fixed.

I made this change to my Anvils to alleviate this bug: https://github.com/aikar/EMC-CraftBukkit/commit/244a1bb98b27e78135381101726876dd22cc7d9a

Comment by Lewis Owen [ 14/Jan/13 ]

It doesn't only apply to repairing, but rather anything you try to apply in the anvil. Like adding books to items. I can't for the life of me add thorns3 to my armor for some reason.

Comment by Aurélien Pugliese [ 09/Jan/13 ]

The bug occurs in SMP when client language is not the same as server language. When you use anvil for repairing or combining, the calculated cost is not the same on client and server. because of the language difference between client and server, the server think you want to rename the tool and add 7 to the initial cost

Comment by Jokke Pappa [ 08/Dec/12 ]

I can confirm this aswell. On SMP I cannot repair tools when im on survival, but if i change my gamemode to creative tool will be repaired. Also if i am able to repair on survival, it will take all of my levels for example if i have 35 and cost is 28 i will lose all 35 levels.

Comment by Dídac García [ 25/Nov/12 ]

I confirm this bug. The same situation on vanilla server (1.4.4) and Minecraft clients (1.4.5). No Mods. It seems that sometimes it repairs, sometimes it doesn't.

Comment by TheVamp [ 20/Nov/12 ]

relates to: https://mojang.atlassian.net/browse/MC-1713
or duplicated

Comment by Josh Miller [ 12/Nov/12 ]

@Björn: A high price for renaming tools makes no sense at all, because you could rename it in advance and thus the price would be much lower. Furthermore you have no benefit from a renamed sword.
I agree, but on the other hand you've worked hard for it and you would have to constantly invest XP for keeping your good tool. Also you can still lose your tool in lava or if you die and cannot retrieve it.

Comment by Björn [ 12/Nov/12 ]

@Josh: I think you absolutely forget that some things may just be rare instead of practically usable and therefore SHOULD be expensive! And for not being able to repair some enchanted swords: where's the fun or competition(SMP) when every user will have nearly unlimited "really good swords"?

Comment by Josh Miller [ 12/Nov/12 ]

The anvil, as it is now, is not really usable. The price for renaming is incredibly expensive (39 levels on a good sword) for no benefit and the really good enchanted swords cannot be repaired. (What do I need a repair-function for If I cannot use it for the tools that are worth keeping?)

Comment by Björn [ 05/Nov/12 ]

We can confirm this bug. It seems that sometimes it repairs, sometimes it doesn't.

Comment by Jan Ebsen [ 02/Nov/12 ]

I have experienced the same bug, though only in multiplayer LAN, I haven't tested in singleplayer or multiplayer yet.

Occurs when you:

  • Repair any tools with the required material, or merge two tools together

If you left click the merged item (the result of the tool and the material, or the two tools):

  • The anvil resets and you loose the XP required for the merge, but the original tool(s) and materials are given back to you

If you shift left click the merged item:

  • The merged tool goes to your inventory, but when you try to move the tool in your inventory, the anvil resets and you loose the XP required for the merge (but keep tools/materials)

Though it may seem that you loose the XP, you will regain the lost XP when you recieve XP for something.

Steps to reproduce:
1. Insert tool and material required to repair the tool into anvil
2. Left click on the repaired tool (anvil resets, XP lost)
3. Recieved XP by killing animal/mob, mining (XP regained)

Generated at Sun Jan 12 11:56:03 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.