
Video: Switching Rail Track Directions in Minecraft 1.18.2+ by Machy
How to build it
- Build the Rail Intersection
Lay down your regular rails and powered rails to form a T-intersection where one main track splits into a left and a right path. Make sure the center junction piece is a normal rail, as powered rails cannot curve.
- Place a Torch Under the Junction
Dig down below the center curved rail of your intersection. Leave the solid block directly beneath the rail intact, and place a redstone torch on the underside (or two blocks down) so that it powers the block supporting the junction rail.
- Position the Surface Lever
Choose a convenient spot near the track where you can reach it while riding or waiting in your minecart. Place a lever on top of a solid ground block.
- Wire the Lever Inverter
Dig two blocks down below the lever's ground block and place a piece of redstone dust directly beneath that block. Attach a second redstone torch to the side of the block that holds this redstone dust.
- Connect the Underground Redstone Line
Dig a three-block-deep trench from the lever setup over to the block supporting the first redstone torch under the track. Run a line of redstone dust along the floor from the lever's side torch straight into the block holding the track's redstone torch.
- Cover the Wiring and Test
Cover up your underground trench with floor blocks so all the redstone is completely hidden. Flip the lever to watch the curved rail flip between left and right, then test it by riding a minecart down the line.
How it works
This circuit works by taking advantage of how curved regular rails respond to a redstone signal while keeping all wiring hidden underground:
- Lever Input: When you flip the surface
LeverON, it strongly powers the floor block beneath it, which turns on the piece ofRedstone Dustsitting two blocks down. - Signal Inversion: That dust powers the block it sits on, turning OFF the
Redstone Torchattached to the side of that block. - Underground Line: With the side torch turned off, the underground
Redstone Dusttrail loses power, allowing the secondRedstone Torchunderneath the rail junction to turn ON. - Track Switching: The vertical torch strongly powers the solid block directly beneath the curved
Rail, causing the rail to flip its orientation from one direction to the other. Flipping the lever back reverses the torch states and switches the track back.
Tips & variations
- Simpler Direct Wiring: If you place the lever close to the intersection, you do not strictly need the double-torch inverter—you can simply run redstone dust from under the lever block into the block holding the vertical torch beneath the rail.
- Use Regular Rails at the Corner: Only regular
Railblocks can curve and switch directions;Powered Rail,Detector Rail, andActivator Railalways stay straight. - On-the-Fly Switching: Place the lever a few blocks ahead of the intersection along the incoming track so you can click it while moving in your minecart without stopping.
- Repeater Extension: If your lever is more than 15 blocks away from the intersection, place a redstone repeater along the underground dust line to refresh the signal.





