eclipseisoffline / jukeboxcustomdiscfix

This mod fixes bug MC-260346, which causes custom music discs, when played in a jukebox, to be cut off when the vanilla disc would normally end.
https://modrinth.com/mod/jukebox-custom-disc-fix
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Update to 1.21 #3

Closed eclipseisoffline closed 3 months ago

eclipseisoffline commented 3 months ago

1.21 will remain fabric only for the time being.

Even though 1.21 introduces datapack provided music discs, which should be used over this mod whenever possible, this mod will still be updated to continue support for modifying discs with just a resourcepack. Additionally, client side support will be added so that users can listen to custom discs using a resource pack like normal without servers having this mod or any datapacks installed.

gradle.properties has been updated and server side functionality has been fixed (the main logic responsible for sending jukebox song start/stop packets has been moved to the JukeboxSongPlayer from the JukeboxBlockEntity class, and the mixin for this has been updated accordingly).

Client side support has been added by ignoring all 1011 level event packets (sent to stop a song from playing), and instead relying on a jukebox block state update packet to stop a playing disc (when has_record turns to false, the song is stopped).