stfwi / redstonepen

Minecraft mod adding a pen to draw Redstone tracks in all directions, a PLC for Redstone, and relays.
MIT License
15 stars 2 forks source link

Make an AND gate variant of the relay #27

Open wqferr opened 1 year ago

wqferr commented 1 year ago

Yes, the RLC can do it, but it's crazy expensive for something as basic as a single logic gate.

If I may suggest an implementation style, maybe go with FRONT = BACK AND (LEFT OR RIGHT)

stfwi commented 1 year ago

Hi William, let me think about this; the relays are by design in the first place Redstone Repeater-like, but as I added already some additional relay types (for coding fun), you have definitely a point there. Some kind of simple AND functionality is a missing piece. Important is that there are enough good use cases to rectify adding the block (in order not to just spam JEI of the players and having to maintain it).

Do you have concrete applications in mind where you need a lot of AND functionality without further signal processing that would need an RLC anyway?

Cheers,-

wqferr commented 1 year ago

The specific case I had in mind is a brewery system, where I needed to trigger a specific dispenser with a confirm signal, ANDing the selection with the confirm. The way I had to do it was with pistons pushing a block into place, which were used by relays to transmit a signal only to the correct line. An AND gate could flatten one of the dimensions needed by removing the piston altogether, though certainly not making it trivial to wire it compactly.

Therefore even if my use case didn't exactly need an AND gate as described, I believe it would be nice to have. I think the piston construction would be the next best thing to an AND gate (better than building them out of NOTs, in my opinion), and as I said they can be a bit bulky and hard to wire for, especially in constrained spaces as is usually the case for redstone pen circuits.