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]

Can I replay levels in Hi-Fi Rush? Can I replay levels in Hi-Fi Rush?

Posted On: February 19, 2023
I missed some collectables in a stage and want to go back to get them. Is there a way to replay a stage? Question from user Stevoisiak at gaming.stackexchange.com. Answer: Yes, you can replay...[More]


What are the advantages of alignment in Star Wars The Old Republic? What are the advantages of alignment in Star Wars The Old Republic?

Posted On: May 10, 2023
How do Dark Side and Light Side points work with regard to your faction? . In Star Wars the Old Republic, you can earn alignment points towards light side or dark side from conversation choices and...[More]


How to download Windows games from Steam onto a Linux computer? How to download Windows games from Steam onto a Linux computer?

Posted On: November 11, 2023
I recently switched to an Ubuntu computer and the one thing that annoys me is the lack of games available. However I have found a program called WINE which can run Windows applications (.exe) on Linux...[More]


What is the optimum pattern to place crops in Minecraft? What is the optimum pattern to place crops in Minecraft?

Posted On: April 25, 2023
What factors affect soil hydration and crop growth time? What is the most efficient layout of dirt and water to grow crops? Question from user Joe Dovahkiin at gaming.stackexchange.com. Answer: ...[More]


Professor Layton: are there multiple solutions to Alchemists Lair 08? Professor Layton: are there multiple solutions to Alchemists Lair 08?

Posted On: March 12, 2023
In Professor Layton and the Miracle Mask, are there multiple solutions to the Alchemist's Lair 08 downloadable puzzle? I find that the four flasks in the bottom right corner should be able to b...[More]


Who knows Dark Magic? Who knows Dark Magic?

Posted On: February 12, 2023
When playing Harry Potter Years 5 to 7, I noticed there are things only Wizards with Dark Magic can interact with. I figure these are things I will have to go back and do later, as right now I don'...[More]


Is there any way to reduce repeated science experiments in KSP? Is there any way to reduce repeated science experiments in KSP?

Posted On: April 10, 2023
There are many science experiments in the game that only give you part of the value whenever you carry them out and retrieve the data. So, even if you rerun the experiment, you only get part of t...[More]


In Cookie Clicker how can I make profit from stocks? In Cookie Clicker how can I make profit from stocks?

Posted On: March 3, 2023
I am trying to use the stock minigame to make cookies. However, I am having trouble making a profit, because I don't know what patterns to look for in the prices. What should I look for when buyin...[More]


BG3 Rites of Passage BG3 Rites of Passage

Posted On: April 18, 2026
In another thread about using Divine Intervention again Raphael, and finding out that’s a very bad idea if you’re unprepared, several people posted some variation of “It happens to everyone at l...[More]


Does Hogwarts Legacy have a PS4 Version? Does Hogwarts Legacy have a PS4 Version?

Posted On: March 30, 2023
I read an article months ago that said April 4th was the release date for PS4 but I looked and I have to wait till May 5th??? Omg I’m so f’ing angry. Has it always been May 5th? I asked of...[More]