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 you control what ore a drill harvests when its placed over multiple ores? Can you control what ore a drill harvests when its placed over multiple ores?

Posted On: January 5, 2024
I'm trying to harvest the maximum amount of uranium possible from a small patch. Unfortunately, there is a bordering coal patch nearby as well, and two of my electric mining drills are within rang...[More]


How do I make food in Planet Crafter? How do I make food in Planet Crafter?

Posted On: April 29, 2024
In The Planet Crafter, I'm building my base, and I have enough food for now. I don't have any machines to make food, but I know I'm going to eventually run out. I guess that, like with water, I'm goin...[More]


Does harming a companion indirectly with Warding Bond affect their approval? Does harming a companion indirectly with Warding Bond affect their approval?

Posted On: March 14, 2024
If one of my companions casts.Warding Bond.on my main character, and therefore takes damage whenever "I" do, does.harming them in that way cause their approval to decrease?I would think not, since the...[More]


What's the Path of Least Resistance for Honor Mode? What's the Path of Least Resistance for Honor Mode?

Posted On: November 11, 2025
I really wanna get it done, I know the basics, talk down Lump and the goblins in the village, wander around and get Karlach, free Slazza, what's everything that you should be doing to get high enough ...[More]


What is CP in PokemonGo? What is CP in PokemonGo?

Posted On: April 24, 2023
Pokémon have a statistic called CP. What does it do, and why is it relevant? Is it a substitute for the nonexistent levels and statistics, or is it something completely different? Questio...[More]


How do I install Portal 2 Authoring Tools without Portal 2 installed? How do I install Portal 2 Authoring Tools without Portal 2 installed?

Posted On: October 20, 2023
Is it possible to install the Portal 2 Authoring Tools without having Portal 2 installed? Otherwise, how could I fool Steam into thinking I have? The reason I'm asking is that I have Portal ...[More]


How do I befriend Undyne? How do I befriend Undyne?

Posted On: April 17, 2024
So, I just beat undertale, and I got the neutral ending. At the end, . Flowey told me that I wasn't a good enough friend to Papyrus and Undyne. Then I talked to Papyrus, and he said Undyne wants to b...[More]


Can I skip the launcher when launching Baldurs Gate 3 from Steam? Can I skip the launcher when launching Baldurs Gate 3 from Steam?

Posted On: July 12, 2023
I don't want to have to go through the "Larian Launcher" when I want to play Baldur's Gate 3 in Steam. How can I skip it? Question from user Oak at stackexchange. Answer: To...[More]


What happens if the guards begin a search while you have the VIP Pass on Rock the Cradle? What happens if the guards begin a search while you have the VIP Pass on Rock the Cradle?

Posted On: October 24, 2023
If you have the VIP Pass on Rock the Cradle, all private areas of the heist essentially become public areas. Cameras and guards do not detect you in casing mode in the VIP area of the nightclub, or in...[More]


How did the cat end up in the city in Stray? How did the cat end up in the city in Stray?

Posted On: August 14, 2023
At the beginning of Stray, the cat is walking with his cat friends in nature presumably outside the city. How did the cat end up in the city at the beginning of the game if the city had been sealed? ...[More]