Four-Way Universal Rail Junction

Switching tracks at busy railway intersections often forces you to exit, break, and replace your minecart manually. This four-way universal rail junction solves that problem by using pistons to physically shift the track and your minecart onto side lines at the press of a button. It also automatically merges incoming carts from either side track right back onto the main line.

Minecart & Rail CircuitsBeginnerJava Edition
Four-Way Universal Rail Junction video tutorial

Video: Four-Way Interchange / Universal Rail Junction - Minecraft JAVA EDITION 1.11 by AxleMC131

How to build it

  1. Lay the Main Line Braking Section

    On your continuous main railway line, place three unpowered powered rails in a row at the center of your intersection. These act as an automatic brake to stop incoming minecarts so the rider can choose a direction.

  2. Place the First Shunting Pistons

    Next to the first outer unpowered powered rail, place a sticky piston facing directly into the rail. Leave a one-block gap on the opposite side of that powered rail, and place a regular piston facing back toward the sticky piston.

  3. Insert the Redstone Block and Buffer

    Dig out the floor block in the one-block gap right in front of the regular piston and place a Block of Redstone in the floor. Place a solid building block directly behind that redstone block gap to act as a bumper.

  4. Wire the Track-Switching Button

    Build a small pillar of solid blocks up and over the sticky piston so it is within arm's reach of a stopped player on the rail. Attach a button to the block so pressing it powers the sticky piston below.

  5. Connect and Curve the First Spur Line

    Lay regular rails leading away from the Block of Redstone to form your first side branch. Press the button once to test the sticky piston; this shifts the powered rail over and permanently forces the adjacent regular rail into a curve.

  6. Install the Incoming Detector Rail

    Starting from the curved rail next to your Block of Redstone, count three straight regular rails outward along the spur line. Replace the fourth rail with a detector rail.

  7. Wire the Return Delay Line

    Dig a one-block-deep trench alongside the three straight rails between the detector rail and the regular piston. Place one redstone dust next to the detector rail, followed by two redstone repeaters set to maximum delay (4 ticks each) running into the block beneath the regular piston, then cover the trench with slabs.

  8. Mirror the Setup for the Second Spur

    Move to the opposite outer powered rail of your three-rail main line brake and build the exact same assembly mirrored to the other side. Place the sticky piston, the floor Block of Redstone, the regular piston, the bumper block, the button pillar, and the detector rail with its two max-delay repeaters.

How it works

This junction takes advantage of the game mechanic that allows pistons to push rails horizontally without breaking them, alongside the directional launch behavior of powered rails.

  • Main Line Braking: The three central powered rails are left unpowered by default. When a player rides into the junction on the main line, the unpowered rails halt the minecart. To continue straight along the main line, the player simply holds the forward movement key (W).
  • Switching to a Spur Line: When stopped in front of one of the sticky pistons, pressing the corresponding button extends the sticky piston for a brief pulse. It pushes both the unpowered powered rail and the player's minecart one block sideways onto the hidden Block of Redstone. Because a solid bumper block sits behind the redstone block, the newly energized powered rail immediately launches the minecart forward around the curved rail and down the spur line. When the button pulse ends, the sticky piston pulls the powered rail back to the main line.
  • Merging Back to the Main Line: When a minecart approaches the junction from a spur line, it passes over the detector rail four blocks before the corner. The detector rail sends a signal through a piece of redstone dust into two redstone repeaters set to 4 ticks each (8 redstone ticks total). Just as the cart drops off the end of the curved track onto the Block of Redstone, the delayed signal reaches the regular piston, pushing the player and minecart sideways back onto the main line.

Tips & variations

  • Three-Way Junction Variant: If you only need a T-junction (one main line and one side branch), simply build the first half of the tutorial and omit the mirrored second side.
  • Adjusting for Server Lag or Cart Speed: The two repeaters on maximum delay are calibrated for a minecart arriving at full speed. If your incoming carts move slower or your server experiences lag, add an extra repeater to the trench so the regular piston doesn't fire before the cart arrives.
  • Cart Alignment: Make sure your minecart is stopped directly in front of the sticky piston before pressing the button. If you overshoot too far forward, the bumper block will obstruct the cart from shifting sideways.
  • Horizontal Movement Only: Never attempt to move rails up or down with pistons—vertical movement will immediately pop the rails off as items.

Frequently asked questions

How do I keep going straight on the main line without switching tracks?
When your minecart stops on the three unpowered powered rails in the middle, simply hold your forward movement key (W) to coast across onto the powered track ahead.
Why doesn't my minecart launch after the sticky piston pushes it onto the side track?
Make sure you placed a Block of Redstone underneath the spot where the rail gets pushed, and verify there is a solid building block directly behind it. A powered rail requires a solid block at one end to know which direction to propel a stationary minecart.
Can I build a three-way junction with this design?
Yes! Each spur line operates independently. To make a three-way junction, simply build one side of the shifter mechanism and leave the second side out.

Components used

More rail switch