Compact T Flip-Flop

A T Flip-Flop is an essential redstone memory circuit that converts a brief pulse, such as a button press, into a continuous toggled output like a lever. Pressing the input once turns the circuit on indefinitely, and pressing it a second time switches it back off. This simple design is perfect for controlling piston doors, lighting systems, and hidden base entrances from multiple locations.

Memory CircuitsBeginnerJava Edition
Compact T Flip-Flop video tutorial

Video: How to Build a T Flip Flop in Minecraft! by Mr. Technician

How to build it

  1. Place the Input Block

    Start by placing a solid building block that will receive your input signal. Attach a button to this block, or run your trigger line directly into it.

  2. Add the Vertical Sticky Piston

    Place a sticky piston facing straight up directly adjacent to your input block so that powering the input block also activates the piston. Place a regular solid building block on top of this sticky piston's head.

  3. Set Up the Repeater

    Place a redstone repeater facing away from the block sitting on top of the vertical sticky piston. Leave this repeater on its default 1-tick delay.

  4. Install the Output Sticky Piston

    At the output end of the redstone repeater, place a second sticky piston facing horizontally away from the repeater. Attach a Block of Redstone to the face of this horizontal sticky piston.

  5. Connect Your Output Line

    Place redstone dust or your output mechanism at the spot where the Block of Redstone lands when pushed out (or at its retracted position if you prefer an inverted default state).

How it works

This circuit relies on the unique 1-tick block-dropping mechanic of sticky pistons in Minecraft Java Edition along with a slight timing delay:

  • Signal Entry: When you press the button, the input block powers both the vertical sticky piston and the Redstone Repeater (through the solid block sitting on the piston) at the exact same moment.
  • Short Pulse Creation: Before the vertical sticky piston finishes pushing its solid block upward and cutting off the connection, the 1-tick repeater manages to grab a brief 1-tick pulse.
  • Toggling the State: The repeater sends this 1-tick pulse into the horizontal sticky piston. Because a sticky piston pulsed for only 1 redstone tick will push its block out and leave it behind (or grab it back on the next 1-tick pulse), the Block of Redstone toggles between its extended and retracted positions each time you press the button.

Tips & variations

  • Java Edition Exclusive: This specific design relies on sticky pistons spitting out their blocks when given a 1-tick pulse, which is a mechanic exclusive to Minecraft Java Edition. It will not toggle properly in Bedrock Edition (where sticky pistons always pull their block back regardless of pulse length).
  • Dual Outputs: You can take your output from either the extended position or the retracted position of the Block of Redstone, depending on whether you want the circuit to start ON or OFF—or even use both positions to toggle between two different contraptions.
  • Repeater Timing: Make sure the repeater stays on its default 1-tick setting; increasing the delay will prevent it from sending the short pulse required to drop the redstone block.

Frequently asked questions

Why does the sticky piston pull the redstone block right back instead of leaving it?
If the horizontal sticky piston pulls the Block of Redstone back immediately, you likely either increased the delay on the redstone repeater past 1 tick, or you are playing on Minecraft Bedrock Edition where sticky pistons do not spit out blocks on a 1-tick pulse.
Can I trigger this T Flip-Flop with something other than a button?
Yes! As mentioned in the tutorial, you can power the input block using any pulse source, such as a pressure plate, observer line, detector rail, or tripwire hook.
Can I take an output from both positions of the Block of Redstone?
Absolutely. One position will be powered while the other is unpowered, allowing you to alternate power between two separate redstone lines with each press of the button.

Components used

More t flip-flop