ViaVersion / ViaBackwards

Allows the connection of older clients to newer server versions for Minecraft servers.
https://hangar.papermc.io/ViaVersion/ViaBackwards
GNU General Public License v3.0
456 stars 86 forks source link

Issues with Mending #753

Closed Velosofy closed 4 days ago

Velosofy commented 3 months ago

'/viaversion dump' Output

Unable to generate, doesn't output anything

Console Error

No response

Bug Description

Mending enchantment doesn't really work as expected.

Trying to fix your tools/armor with Mending doesn't really fix the durability, the durability does increase, but it either reset to original or just stop repairing. Even in the odd chance it "repairs", it doesn't actually repair.

This is the oddness that happens on my server. I was AFK-farming XP, came back and my armor/tools were not repaired. This is when I first notice the issue. See video You can see in the video that my armor is not repaired in 1.20.4 client, but when I login with 1.20.6 client, the armor has full durability.

See video testing for more detail Left is 1.20.4, Right is 1.20.6

EDIT : After further testing (more like accidental), in my SMP server (that has same mods with my test server) with 1.20.4 client, the durability value shows the correct one after updating the value ( it's like I have to force-refresh the UI by getting hit to reduce its durability ) image

EDIT 2 : My durability values reset to old values again (not all the armor), seems to be jumping around the place... I have no idea what's going on now. How can I even diagnose this lmao?

If you like to ask me further question, I'm open for chats in Discord (same handle, in ViaVersion Discord)

Steps to Reproduce

  1. Setup Fabric 1.20.6 server with Via* installed
  2. Login with 1.20.4 client
  3. Try doing various combination of "repairing tools with Mending"

Expected Behavior

Mending should work normally.

Additional Server Info

Client Info: Vanilla 1.20.4 and 1.20.6

Server Info: Fabric 1.20.6 (Loader 0.15.11 - Installer 1.0.1) with 4 mods

Server Mods:

fabric-api-0.97.8+1.20.6.jar ViaFabric-0.4.14+576-dev.jar ViaBackwards-5.0.0-SNAPSHOT.jar ViaVersion-5.0.0-SNAPSHOT.jar

Checklist

Barvalg commented 3 months ago

Error: Invalid or missing dump

FireController1847 commented 2 months ago

I'm having the same issue, actually. Connecting a 1.20.1 client to a 1.20.6 server, once I repair my tool completely at least once, then mending will start glitching out. Connecting on a Bedrock client (using Geyser) or using an updated Java Edition client (1.20.6 or higher) will fix this issue, so it seems to be an issue with ViaBackwards. It seems it requires tools that had mending BEFORE updating the server to 1.20.5+ (or when migration to components occurred). This doesn't happen with newly spawned in items. So it's likely a migration issue, something is being handled differently for migrating items that ViaBackwards' code doesn't know about.

To reproduce: Ensure you are using a pre 1.20.5 client (I was able to reproduce on 1.20.1, milage may vary). Launch a pre 1.20.5 (I started on 1.20.1) Spigot server. Enchant some items with mending, then break them a little bit. Update your server to 1.20.5+ (I updated to 1.20.6). Completely repair your items. Suddenly, displaying is broken on the pre 1.20.5 client, indicating an issue with ViaBackwards.

Long story short, +1 on this issue. Glad to know it's only a display bug though, doesn't seem to affect the actual durability of the item on the server's side (it properly repairs on the server, just displays incorrectly on the client).

Here is my ViaVersion dump: https://dump.viaversion.com/850e6cc94298b781a29aca18b4a90340ea1f63376fb9da7209d30c10df59157f

PaperMC /version output:

> version
[19:29:35 INFO]: Checking version, please wait...
[19:29:36 INFO]: This server is running Paper version 1.20.6-147-ver/1.20.6@e41d44f (2024-06-17T19:24:35Z) (Implementing API version 1.20.6-R0.1-SNAPSHOT)
You are running the latest version
Previous version: git-Paper-223 (MC: 1.20.2)

Can confirm this issue still occurs with ViaBackwards 5.0.1.

JAdinolfi commented 1 week ago

+1 on this very specific issue, any solution that doesnt involve just remaking tools/armor?

kennytv commented 1 week ago

Cannot reproduce with or without an upgraded world, survival or creative, on 5.0.4 snapshot builds, no client mods or other plugins, looks like this was fixed somewhere in dev builds alongside other changes