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
441 stars 85 forks source link

Sound pitch is not translated between versions #802

Open Pablete1234 opened 3 weeks ago

Pablete1234 commented 3 weeks ago

/viaversion dump Output

https://dump.viaversion.com/cf4487d47d27d9e029cb71ee8daa2431315a2fce876ea3ad855cda7a26f8f251

Console Error

No response

Bug Description

It appears that viaversion does not bother mapping the pitch of sounds, which leads to some things sounding very off.

The one thing that stands out is pressure plates, this is the serverside behavior across versions: in 1.21, sends a "block.wooden_pressure_plate.click_on" with pitch 1.0F in 1.18.2, sends a "block.wooden_pressure_plate.click_on" with pitch 0.8F (different for on/off and stone/wood) in 1.8.8, sends a "random.click" with pitch 0.6F (diff for turning on/off)

However, viaversion will just translate the keys and call it a day, and when a 1.18.2 client hears the sound with a pitch of 1, it sounds way higher pitch than normal (0.8).

I am assuming that the sound in the vanilla pack itself has changed over time, so before the pitch was changed via the packet, while in the newest versions the sound file itself is already pitched to sound ok with a pitch of 1.0. Pressure plates are the one we noticed, but this seems likely to have happened to more sounds.

Steps to Reproduce

Setup a server running in 1.20.6/1.21 paper

Log in with a 1.20.6/1.21 client Step on a wooden and/or stone pressure plate The sound is normal, it sounds correct

Log in with a 1.18.2 client Step on a wooden and/or stone pressure plate The sound is the correct one ("pressure plate clicks", as shown if accessibility->show subtitles is enabled) but the pitch is not the right one

Log in with a 1.8 client Step on a wooden and/or stone pressure plate, the sound is very off, sounds like a dispenser not a pressureplate

Expected Behavior

The not just the key but the pitch should also be mapped across versions

Additional Server Info

No response

Checklist

Barvalg commented 3 weeks ago

Platform: 1.21--15--2df432f%20%28MC%3A%201.21%29
ViaVersion (5.0.1): Even with master
ViaBackwards(5.0.1): Even with master
ViaRewind(4.0.0): 5 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

Pablete1234 commented 3 weeks ago

https://dump.viaversion.com/305aab2b013083c0d304eef8f6cbe1852dc9c3a62032dd5fb21bfcb49a05b166

Barvalg commented 3 weeks ago

Platform: 1.21--15--2df432f%20%28MC%3A%201.21%29
ViaVersion (5.0.1): Even with master
ViaBackwards(5.0.1): Even with master
ViaRewind(4.0.1-SNAPSHOT): Even with master

kennytv commented 1 week ago

Related to https://github.com/ViaVersion/ViaBackwards/issues/526