ViaBackwards icon indicating copy to clipboard operation
ViaBackwards copied to clipboard

1.21.2/3 "components translation" (Goat horns) issue with earlier MC versions.

Open Athar42 opened this issue 1 year ago • 4 comments

/viaversion dump Output

https://dump.viaversion.com/65a7ad76a604add299eb88479abf27b556fc0be86eb4e912ca0dc57c9497fb18

Console Error

No logs.

Bug Description

Hi there,

This is a "follow up" issue on the report made on November 2nd on the Discord server (were work by @FlorianMichael already started).

Original post :

I may have found an "issue" (not really) with latest ViaVersion release (quite specific 😄 ).

First the dump (you'll see that there isn't that much of plugins, just Via*, ArmorPoser (to manipulate ArmorStands) and CustomDiscs+VoiceChat (both that manipulate discs and goathorn))

The issue is quite simple and easy to reproduce : First, use a 1.21.3 server (Paper in that example), Then, on a 1.21.3 client, give yourself a specific goat horn as follow : /give PLAYER_NAME minecraft:goat_horn[minecraft:instrument={use_duration:1,range:256F,sound_event:"intentionally_empty",description:{"bold":true,"color":"red","text":"Test"}}] (This command will also work on 1.21.1, but as the "description" is new to 1.21.3, will not be written)

At that point, it'll work as expected on both 1.21.1 and 1.21.3 clients (the goat horn will activate with no sound played).

Now the funny part : Disconnect and reconnect to the server, still using the 1.21.3 client => It's OK, the goat horn component remain the same.

Then, use a 1.21.1 client, and... on first connection, the goat horn will still work as expected, but somehow the instrument component got rewrite (the "description" field is removed) and now, if you disconnect and reconnect, still using 1.21.1 client (and probably lower version), the instrument sound will change on each new connection ( 🤣 ).

The Description field is new (and mandatory) to 1.21.2/3, and when we use a lower client which didn't recognize it, just remove the description field. When we reconnect from a 1.21.1 to 1.21.3, the description field is recreated (empty)) and stop the sound to be changed again.

I don't know if this can be handled by ViaVersion, that's why I'm posting this here, but I'm afraid that this is client specific :/

Latest dev build made partially fix the issue :

  • The description field is saved and restored between client versions who hold the goat horn.
  • The sound_event is still change uppon reconnection with MC version prior 1.21.2 (but stay static to its defined value if using 1.21.2+ as expected).

--> Giving the horn in 1.21.3, then go to 1.21.1 : Description component field disappear (and get a special PDC created with those values) as we would expect it, as non-existant in those earlier version), but then, doing the reconnection stuff in 1.21.1 and lower will trigger ONE (and only one, never after if we disconnect/reconnect a few times) change of the sound attached.

BUT : Going back after those changes to 1.21.2/3, the description field AND sound_event are correctly set again.

==> So, what's remaining to fix is to save the "sound_event" while switching from a 1.21.2/3 client to an earlier release (and avoid the server (or client) to change this value.

1.21.3 with the modified goat horn : image image

Going to 1.21.1 : image image

Ping me there or on Discord to do more tests on dev builds as needed (or just for more informations)

Steps to Reproduce

  • First, use a 1.21.3 server (Paper in that example),
  • Then, on a 1.21.3 client, give yourself a specific goat horn as follow : /give PLAYER_NAME minecraft:goat_horn[minecraft:instrument={use_duration:1,range:256F,sound_event:"intentionally_empty",description:{"bold":true,"color":"red","text":"Test"}}] (This command will also work on 1.21.1, but as the "description" is new to 1.21.3, will not be written)
  • Disconnect and reconnect to the server, still using the 1.21.3 client => It's OK, the goat horn component remain the same.
  • Then, use a 1.21.1 client, and... on first connection, the goat horn will still work as expected, but somehow the instrument component got rewrite (the "description" field is removed) and now, if you disconnect and reconnect, still using 1.21.1 client (and probably lower version), the instrument sound (==> minecraft:instrument > sound_event:) will change on each new connection.

Expected Behavior

While a 1.21.1 client hold a modified goat horn from 1.21.3 client, the "Description" field should remain saved, as well as any other component (like minecraft:instrument and all linked below parameters).

Additional Server Info

No response

Checklist

  • [X] Via plugins are only running on EITHER the backend servers (e.g. Paper) OR the proxy (e.g. Velocity), not on both.
  • [X] I have included a ViaVersion dump.
  • [X] If applicable, I have included a paste (not a screenshot) of the error.
  • [X] I have tried the latest build(s) from https://ci.viaversion.com/ and the issue still persists.

Athar42 avatar Nov 20 '24 14:11 Athar42

Platform: 1.21.3--10--92131ad%20%28MC%3A%201.21.3%29 ViaVersion (5.1.1): 21 commits behind master ViaBackwards(5.1.1): 10 commits behind master

Please update all Via* plugins from https://ci.viaversion.com/.In case the issue still persists send the new dump and the issue will be reopened

Barvalg avatar Nov 20 '24 14:11 Barvalg

https://dump.viaversion.com/65a7ad76a604add299eb88479abf27b556fc0be86eb4e912ca0dc57c9497fb18

Athar42 avatar Nov 20 '24 15:11 Athar42

Platform: 1.21.3--25--1ef4c0e%20%28MC%3A%201.21.3%29 ViaVersion (5.1.2-SNAPSHOT): Even with master ViaBackwards(5.1.2-SNAPSHOT): Even with master

Barvalg avatar Nov 20 '24 15:11 Barvalg

Little update to be clear :

  • With those latest snapshot releases : Going from 1.21.2/3 to 1.21.1 and prior make the sound_event to change. Going back from those earlier versions to 1.21.2/3 DO NOT RESTORE the description field or sound_event.
  • Only the version provided on Discord did "fix" the Description and sound_event value while going back to 1.21.2/3

Build can be found there on this post : https://discord.com/channels/316206679014244363/316208160232701955/1302665676753731656

Athar42 avatar Nov 20 '24 15:11 Athar42