Navoei / CustomDiscs

A Paper plugin to add custom music discs using the Simple Voice Chat API.
MIT License
54 stars 13 forks source link

Incompatibility with jukebox loopers/shufflers #47

Open spsquared opened 9 months ago

spsquared commented 9 months ago

I've set up a fairly simple jukebox looper using the new jukebox parity changes, but it doesn't work with custom discs.

When a disc is put into the jukebox, it emits a redstone signal, locking a hopper underneath it. When the song ends, the hopper unlocks, taking the disc out of the jukebox.

However, custom discs will immediately "end" according to the jukebox timer (the redstone signal stops) and then get sucked out of the jukebox, which breaks the system and plays a ton of discs on top of each other.

The timer code for the jukebox is probably very proprietary and changing that information probably more so, but I would like to see this plugin updated to match the new parity updates so I can use the custom discs in my jukebox looper.

spsquared commented 9 months ago

The plugin also seems to allow discs to enter locked hoppers.

image

The hopper is locked, as indicated by "enabled: false" in F3 screen, but the music disc still goes into it instantly.

This actually breaks the plugin, causing it to play a disc and then not stopping it, and ends with multiple discs trying to play at the same time in the same block, which the plugin doesn't like. When one ends, another one starts in the middle of the song.

Edit: The locked hopper taking the disc could be partially caused by a Paper bug, as I've had hoppers repeatedly being weird and putting items where they shouldn't be putting items and generally not understanding when they're supposed to be locked. On a side note, unloading a chunk with a jukebox deletes the playing disc. It just vanishes. RIP Relic disc 2 (this one is definitely a Paper bug)

Edit 2: The Edit is a bug caused by another plugin.

spsquared commented 9 months ago

The items being deleted have been traced to a different (outdated) plugin that modified some of the jukebox code; however removing it doesn't fix the custom discs not functioning like normal discs.

Now the discs are no longer being removed immediately, however the redstone output still stops quickly. The disc stays in the jukebox until it is done, and then enters the hopper.

I'd like to see the jukebox continue to emit a signal while the disc is playing. I'm not sure how hard that is considering the limitations of the libraries used, but it would be nice.

spsquared commented 6 months ago

I just tested in 1.20.4 with the most recent version (2.5.1) and I think this has been patched. Not sure why it wasn't working before, but it seems to still bug out if the chunks are unloaded.