GeckoLib

GeckoLib

146M Downloads

[1.17.x Fabric] Sound events in animated items are fired for all observers, rather than just the owner

pluiedev opened this issue ยท 1 comments

commented

One thing curious I noticed about how GeckoLib handles sound keyframe events is that they are fired for every player who is observing the animation, rather than only firing the event for the item's owner. This makes implementing sounds with one singular source difficult with proper attenuation.

Currently one fix may be to add a check on whether the player is triggering the event (e.g. in my case, using the gravity gun). This might work for one user with multiple observers, but when two users are firing at the same time, they will receive and accept each other's events and so the sound will double. So IMO without fixing this from GeckoLib's side, this problem cannot be sidestepped.

commented

Correct, this is so sounds will play to other players on servers, this was part of the fix to animations not syncing on servers. This isn't a bug, this is intended.