Being able to loop the discs
GNamimates opened this issue · 8 comments
Is your feature request related to a problem? Please describe.
me and my friends have been wanting to add background music depending on where we are around our server, at first we used redstone, but it keeps dis-aligning, causing it to sometimes stop too early or restart too late
Describe the solution you'd like
4th argument for loop as a boolean when applying the music to the disc
/audioplayer musicdisc UUID <name> <loop | boolean>
Describe alternatives you've considered
or comparitors stop outputting signal when the discs finishes
Additional context
even if you dont add this, still thank you for making the mod!, it enhanced me and my friend's experience ❤️
jukeboxes outputs power when its playing a disc, maybe stop the power output once the audio being played is finished?
jukeboxes are never used on redstone contraptions, from what I see on redstone communities, since there are alot more better alternatives like cauldron and the composter, which can be moved by pistons and are cheaper.
I am sure nobody would use jukeboxes on redstone,
but if someone did and are using your mod as well, it will mostly work the same way, and will most likely notice the redstone output stops once they hear the music stop
I thought a bit what downsides there are if discs would infinitely loop...
- A lot of jukeboxes infinitely looping would mean there is a separate thread for all of them and the server needs to handle all these constantly.
- It would also cause a lot of issues with unloading chunks and reloading the world.
- A comparator signal when finished playing might be hard to implement, since the game itself is not aware of the playing audio and you would need to have a callback outside of the main game thread.
For now I won't add this feature, but I will keep it in mind and will try to add it once I have a solution for the issues.