mojira.dev
MC-1907

Mutiplayer: Repairing Tools with an Anvil doesn't work

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.

Related issues

MC-808 Anvil leather pants bug MC-1639 anvil item dup bug MC-2000 Repairing Tools with an Anvil doesn't work MC-2644 Anvils appears to merge items but doesn't, and some other abnormalities MC-3134 Anvil: combine does not work (lvl 39) MC-4045 Anvil repair bug - level cost raised, weapons not combined MC-4064 Minecraft Anvil Bug on servers MC-4204 The Anvil suks more exp than it should be MC-5327 Anvil Interaction Not Working correctly. MC-5479 Enchantment Books MC-5678 When combining tools with enchanted books in SMP, Anvil rejects materials and keeps experience MC-6560 Lost XP in anvil MC-7459 Can't add Thorns III MC-9649 attempted to use a silk touch 1 book with a diamond shovel on an anvil didnt work stole xp MC-12604 Enchanting Chain Armor MC-12644 Anvil repairing enchanted gear with normal gear takes XP and returns both items MC-12716 Enchanted Books won't combine. MC-12778 Enchantment Books, combining them MC-12817 enchanted books disappear in anvil MC-12948 When combining like enchanted books the resulting item dissappears on click. MC-13362 Enchanted books of equal level not creating a master book with higher enchant MC-13449 Combining enchanted books does not work properly (Minecraft Realms).

Comments

Jan Ebsen

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)

Björn

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

Josh Miller

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?)

Björn

@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"?

Josh Miller

@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.

TheVamp
Dídac García

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.

Jokke Pappa

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.

Aurélien Pugliese

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

Lewis Owen

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.

Aikar

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

Kimitsu Desu

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.

Tails

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.

Aikar

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

Tails

The language bug is already reported in MC-1123.

Matias Heiberg Andersen

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.

Jokke Pappa

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.

EvilSeph (Warren Loo)

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.

MCgg

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

ilevelin

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

ilevelin

(Unassigned)

Community Consensus

item

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

Retrieved