gnembon / carpet-extra

Extra Features for Carpet Mod
GNU Lesser General Public License v3.0
291 stars 61 forks source link

[Expansion request] dispensersPlayRecords could be nicer with hopper support or something similar? #153

Open felix91gr opened 3 years ago

felix91gr commented 3 years ago

So we've been playing around with the dispensersPlayRecords rule. It's really nice being able to play records with redstone, it should honestly be in vanilla.

However, since records can be read off of a jukebox with a comparator, I think it'd make sense to make it less cumbersome to extract records from a jukebox. Currently, with dispensersPlayRecords active, you can extract a record by putting a new one inside. This is great, but it overcomplicates the task of making cool things like automatic playlists of records, or a record filter.

I was thinking that maybe:

  1. A hopper could take things out from the bottom of a jukebox, or
  2. A dispenser could take a record out of a jukebox, without the need to be placing a new record in its place.

A secondary proposal I have is for redstone to be able to read whether a jukebox is currently playing a song or not. This makes it possible to have simpler automatic playback, because you can rely on the length of the song itself instead of having to make a specific clock for each record, which you start after detecting which song has been placed into the jukebox.

Anywho. Thanks for this awesome feature in an overall incredible mod and mod ecosystem, @gnembon!

felix91gr commented 3 years ago

or redstone to be able to read whether a jukebox is currently playing a song or not.

I need to clarify something here which was ambiguous, my bad.

I'm thinking of something like the following. A comparator outputs a redstone level corresponding to the record in the jukebox, if and only if the record is currently being played. I think other ways that convey more information are certainly possible (because you could want, for example, to be able to know whether or not a record is inside a jukebox regardless of whether it was playing or not, AND also be able to know if a record is playing, regardless of which one it is), but this one keeps the amount of components lower.

simpson409 commented 3 years ago

as far as i understand it, in bedrock jukeboxes give out a redstone signal (without the need of a comparator) so you can just put a hopper underneath it and as soon as the song ends the redstone signal stops, the hopper is unlocked and the record is being pulled out. playing songs is just as simple, you have a hopper pointing to the jukebox and once the song ends the hopper is unlocked and a new record from the hopper is moved into the jukebox. i'd rather want to see a port of these mechanics than the dispenser functionality.