Can a redstone latch in Minecraft Bedrock Edition be supplemented with a toggle function?

[BACK]
Can a redstone latch in Minecraft Bedrock Edition be supplemented with a toggle function?
Posted On: April 3, 2023

SR latches and T-flip-flops are trivial circuitry in Minecraft redstone, but it appears that there is little to be found for a circuit that combines both, allowing for both SR and T functionality.


I envision an SR-T latch to have set, reset, and toggle inputs respectively, but all connected to the same memory cell. This means that the output can be controlled by setting it, resetting it, and toggling it all at once. Just like an SR latch, pressing S or R when the cell is already in that state should do nothing.


All of my circuitry so far has been "unclean" implementations, either a bodged wiring to add a toggle to an SR latch, or bodged wiring to add SR inputs to a T-flip-flop. What is the best way to go about making such a latch?


See also: Same question for Java Edition (originally one question; separated upon request from others).


Question from user KnowledgeIsPower at gaming.stackexchange.com.


Answer:

The primary mechanism you're going to want is an RS latch and some AND gates. This will operate as a regular RS latch when you press the On or Off button, and as a Toggle when you press Toggle. This works by routing the toggle signal to the appropriate end of your RS latch, turning it on or off based on the current state of the RS latch.


I feel like I've been here before. Anyway. As it turns out there are quite a few differences in how Minecraft Bedrock Edition redstone works that I don't fully understand, which makes my Java Edition answer inoperative in Bedrock edition. However, with some small tweaking, it can be made to work.


The main tweak is a monostable circuit on the Toggle line:.


This circuit uses a sticky piston to, in one game tick, send a redstone pulse and cut it off. This causes the Toggle input to only be on for 1 tick. This prevents the mechanism from cycling more than once when the toggle button is pressed. Without this, the pistons will switch back and forth repeatedly until the signal turns off, which is not what we want.


From here, only minor tweaks are required to the original Java mechanism (Bedrock edition has different rules about when redstone dust connects to pistons, so a few more redstone repeaters were required):.


As in my previous answer, there are sticky pistons underneath the gold blocks which act as AND gates, and a redstone repeater underneath the diamond block to keep the signal from the repeater on the Reset line from being directly connected to the Output line. .


Unfortunately, due to the monostable circuit, this build is quite a bit bulkier in Bedrock edition, coming in at 9x4 on Bedrock (vs 5x4 on Java). 


Answer from user Unionhawk at gaming.stackexchange.com.



[BACK]
Can a redstone latch in Minecraft Bedrock Edition be supplemented with a toggle function?
Posted On: April 3, 2023

SR latches and T-flip-flops are trivial circuitry in Minecraft redstone, but it appears that there is little to be found for a circuit that combines both, allowing for both SR and T functionality.


I envision an SR-T latch to have set, reset, and toggle inputs respectively, but all connected to the same memory cell. This means that the output can be controlled by setting it, resetting it, and toggling it all at once. Just like an SR latch, pressing S or R when the cell is already in that state should do nothing.


All of my circuitry so far has been "unclean" implementations, either a bodged wiring to add a toggle to an SR latch, or bodged wiring to add SR inputs to a T-flip-flop. What is the best way to go about making such a latch?


See also: Same question for Java Edition (originally one question; separated upon request from others).


Question from user KnowledgeIsPower at gaming.stackexchange.com.


Answer:

The primary mechanism you're going to want is an RS latch and some AND gates. This will operate as a regular RS latch when you press the On or Off button, and as a Toggle when you press Toggle. This works by routing the toggle signal to the appropriate end of your RS latch, turning it on or off based on the current state of the RS latch.


I feel like I've been here before. Anyway. As it turns out there are quite a few differences in how Minecraft Bedrock Edition redstone works that I don't fully understand, which makes my Java Edition answer inoperative in Bedrock edition. However, with some small tweaking, it can be made to work.


The main tweak is a monostable circuit on the Toggle line:.


This circuit uses a sticky piston to, in one game tick, send a redstone pulse and cut it off. This causes the Toggle input to only be on for 1 tick. This prevents the mechanism from cycling more than once when the toggle button is pressed. Without this, the pistons will switch back and forth repeatedly until the signal turns off, which is not what we want.


From here, only minor tweaks are required to the original Java mechanism (Bedrock edition has different rules about when redstone dust connects to pistons, so a few more redstone repeaters were required):.


As in my previous answer, there are sticky pistons underneath the gold blocks which act as AND gates, and a redstone repeater underneath the diamond block to keep the signal from the repeater on the Reset line from being directly connected to the Output line. .


Unfortunately, due to the monostable circuit, this build is quite a bit bulkier in Bedrock edition, coming in at 9x4 on Bedrock (vs 5x4 on Java). 


Answer from user Unionhawk at gaming.stackexchange.com.



[BACK]

How do I solve level 7 category normal on Lineum? How do I solve level 7 category normal on Lineum?

Posted On: April 14, 2023
All the stone going around the green and the blue has uneven amount. Plus I keep getting bored trying to figure it out but keep getting the same thing over and over. Question from user Hunter Jason...[More]


How can I tell if a corpse is safe to eat? How can I tell if a corpse is safe to eat?

Posted On: July 9, 2020
I am a human wizard, and I just killed a monster, leaving a corpse on the ground. How do I tell whether it is safe to eat the corpse? I left the monster unspecified because I am interested in "...[More]


I’m getting bored in Hogwarts Legacy I’m getting bored in Hogwarts Legacy

Posted On: August 8, 2023
I’ve been waiting for this game since 2021 when it got announced and was honestly so hyped, but now I’m getting insanely bored. I got the game 3 months ago, then played for 26 hours total,...[More]


Misadventures of P.B Winterbottom leaderboards Misadventures of P.B Winterbottom leaderboards

Posted On: March 24, 2023
The Misadventures of P.B Winterbottom is absolutely brilliant (if maybe a little short). Anyway, now that I've finished it, I'm in the process of going through the bonus shorts (levels), and a...[More]


Is it possible to entirely disable updates for a game on Steam? Is it possible to entirely disable updates for a game on Steam?

Posted On: April 19, 2023
I thought I'd found information about this before, but now it seems gone. Is it possible to disable updates on a Steam game? I'd like to play an old version of a single-player game, because th...[More]


Why am I unable to ascend as Astarion? Why am I unable to ascend as Astarion?

Posted On: September 12, 2023
I've just defeated Cazador, but am missing the dialogue option to ascend in his place. All I can do is stab him. What did I miss and is there any way to fix this other than reloading back? Ques...[More]


Finished Far Cry Primal, but the play through is only at 54.02% Finished Far Cry Primal, but the play through is only at 54.02%

Posted On: August 24, 2023
I just finished Far Cry Primal. I played about 30 hours, and did all the (people) missions. I also build and crafted everything. I conquered all the towers and area's, and tamed all the b...[More]


Why did I get surrounded by so many treasure goblins? Why did I get surrounded by so many treasure goblins?

Posted On: July 8, 2023
I think I'm starting to ask too many stupid questions about treasure goblins. I was slashing some mobs in the first level of a Nephalem Rift with a friend (it was like 3 minutes after we starte...[More]


I need some help with multiclassing I need some help with multiclassing

Posted On: July 1, 2024
Stepping into BG3 again. Honestly? I forgot how much fun this is! I’m half way to level 6 on this current play through as a Druid (not my normal choice but so munch fun!) .With having never played D...[More]


How much health does an Apple heal? How much health does an Apple heal?

Posted On: January 20, 2023
How much HP does an apple heal? Whenever I pick up an apple the amount healed seems to vary. Does the amount healed scale with my character's maximum HP? Question from user Stevoisiak at gaming...[More]