FoundationGames / Phonos

A FabricMC mod adding radio and audio related blocks.
MIT License
12 stars 8 forks source link

Fix bug with jukebox crashing dedicated server #4

Closed Dadadah closed 3 years ago

Dadadah commented 3 years ago

Fixes #2

The dedicated server does not have access to the SoundEvent.getID() function, and it had to be replaced with sending the ID of the music disk for built in disks. Instruments also have their enum sent to the client in order to bypass getID() as well.

I tested this solution on my dedicated server, as well in a single player world.

I'm not a Minecraft mod developer, just found these bugs easy to solve. Please let me know if I can improve this solution.

Giggitybyte commented 3 years ago

Has this been tested with modded discs as well?

Dadadah commented 3 years ago

Has this been tested with modded discs as well?

This code doesn't modify how the mod handles modded discs. I just tested it to be sure though, modded disks work on local servers as well as dedicated servers.

Giggitybyte commented 3 years ago

Good to hear! Hopefully your PR is merged soon.

FoundationGames commented 3 years ago

The PR is now redundant, although the contribution is much appreciated!