TeamTernate / infinite-music-discs

Tool for adding lots of custom music discs to Minecraft
82 stars 15 forks source link

Song length gets erroneously rounded down to the nearest second, deleting some audio data at the end #127

Closed Draglann closed 2 months ago

Draglann commented 4 months ago

Example: A song with a length of 3:13.742 will be converted to a disc with a length of 3:13.000

Some songs that I've listened to will abruptly be cut off at the end. I've looked in the play_duration.mcfunction file in the generated datapack and it shows the song length in ticks. I've converted the tick count to second count, and it shows the song length without adding the extra sub-second data.

Adding 20 extra ticks to the play duration fixes this issue, however a more sophisticated fix that generates a tick time rounded to the next higher x:xx.x50/x:xx.x00 would be preferable. eg. 3:13.742 -> 3:13.750

bradytheinventor commented 2 months ago

Duplicate of #110. This is on my list to fix, hopefully soon.