Blue Skies music tracks don't allow sound event listeners to track them
• Minecraft Version: 1.19.3
• Forge Version: 44.1.23
• Mod Version: 1.3.22
I started work on a small mod that will display a toast when an in-game music track starts playing and will provide the song name and author. I noticed that for some reason none of the songs in Blue Skies are properly tracked when they start, so I decided to investigate. (Do note I looked into this in 1.19.2 but the code is still the same in 1.19.3 so it applies there as well)
It looks like you guys have a special music system that plays tracks via TickableSoundInstance
s. This is all fine and good, but using the default settings will make it so the sounds will never get tracked. There are 3 ways to allow tracking:
- set the sound's attenuation to
NONE
instead ofLINEAR
- set the sound's
relative
field to true - give the sound a high attenuation distance, or properly set its origin.
The first 2 are very easy to change and can simply be set in your sound instance constructor. The third one probably isn't as useable in your case since you're using background music rather than a moving sound instance, but you could in theory use the LocalPlayer
as a reference and set/update the sound origin based on that.
I know this for sure isn't a priority, but I figured I would bring it up as I would love to see it resolved. Thank you guys for your hard work and keep doing amazing things <3