Autonomous Multi-Car Express Train

Build a multi-car steam express train using block_display entities that pulls into a central station, pauses with steam effects, and departs automatically.

Java EditionComplex Contraptions & CinematicsMedium24 commandsTested on a real 26.2 & 26.3 server
A custom block-display steam locomotive pulls colorful passenger carriages into a Minecraft train station with billowing smoke. Download the GIF Video & GIF © www.9minecraft.net

Rides & RollercoastersIndustrialTechnologyBlackRedWhiteDecorationMap MakingServer LobbyBlock displaysArmor standsRiding & passengersSummoned mobsBlock building (fill/setblock/clone)Sounds21+ commands

Traditional minecarts in Minecraft are small and locked to single-block rails. By combining block_display entities with decomposed transformations, you can construct a large-scale steam locomotive pulling multiple colourful passenger carriages down a wide railway.

This command setup builds a central station platform and summons a multi-car express train that rolls into the station with billowing smoke and wheel sparks, brakes with a burst of steam, rings a station bell, and departs down the line on an automatic schedule.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_train dummy
  2. /fill ~-17 ~-1 ~-2 ~17 ~-1 ~2 minecraft:gravel
  3. /fill ~-17 ~ ~-1 ~17 ~ ~1 minecraft:rail[shape=east_west]
  4. /fill ~-17 ~ ~ ~17 ~ ~ minecraft:stone_brick_slab
  5. /fill ~-6 ~ ~-5 ~6 ~ ~-2 minecraft:smooth_stone_slab[type=double]
  6. /fill ~-6 ~1 ~-5 ~6 ~3 ~-5 minecraft:spruce_fence
  7. /fill ~-6 ~4 ~-5 ~6 ~4 ~-2 minecraft:dark_oak_slab
  8. /setblock ~-4 ~2 ~-4 minecraft:lantern[hanging=false]
  9. /summon minecraft:armor_stand ~-8 ~0.5 ~ {Invisible:1b,NoGravity:1b,Marker:1b,Tags:["c9_t","c9_loco"],Passengers:[{id:"minecraft:block_display",Tags:["c9_t"],block_state:{Name:"minecraft:polished_blackstone"},transformation:{translation:[-1.6f,0f,-1.1f],scale:[3.4f,0.6f,2.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_t"],block_state:{Name:"minecraft:red_nether_bricks"},transformation:{translation:[-0.4f,0.6f,-0.8f],scale:[2.0f,1.4f,1.6f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_t"],block_state:{Name:"minecraft:crimson_planks"},transformation:{translation:[-1.6f,0.6f,-1.0f],scale:[1.2f,2.1f,2.0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_t"],block_state:{Name:"minecraft:basalt"},transformation:{translation:[0.8f,2.0f,-0.25f],scale:[0.5f,1.2f,0.5f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_t"],block_state:{Name:"minecraft:gold_block"},transformation:{translation:[1.5f,0.9f,-0.35f],scale:[0.4f,0.7f,0.7f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}]}
  10. /summon minecraft:armor_stand ~-8 ~0.5 ~ {Invisible:1b,NoGravity:1b,Marker:1b,Tags:["c9_t","c9_cars"],Passengers:[{id:"minecraft:block_display",Tags:["c9_t"],block_state:{Name:"minecraft:polished_blackstone"},transformation:{translation:[-5.3f,0f,-1.1f],scale:[3.3f,0.5f,2.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_t"],block_state:{Name:"minecraft:blue_terracotta"},transformation:{translation:[-5.2f,0.5f,-1.0f],scale:[3.1f,1.1f,2.0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_t"],block_state:{Name:"minecraft:cyan_stained_glass"},transformation:{translation:[-5.1f,1.6f,-1.02f],scale:[2.9f,0.8f,2.04f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_t"],block_state:{Name:"minecraft:polished_blackstone"},transformation:{translation:[-8.9f,0f,-1.1f],scale:[3.3f,0.5f,2.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_t"],block_state:{Name:"minecraft:green_terracotta"},transformation:{translation:[-8.8f,0.5f,-1.0f],scale:[3.1f,1.1f,2.0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_t"],block_state:{Name:"minecraft:yellow_stained_glass"},transformation:{translation:[-8.7f,1.6f,-1.02f],scale:[2.9f,0.8f,2.04f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}]}

2. Loop - one repeating command block each (Always Active) 14 commands

  1. /scoreboard players add @e[type=armor_stand,tag=c9_loco] c9_train 1
  2. /execute as @e[type=armor_stand,tag=c9_loco,scores={c9_train=1..50}] at @s run tp @s ~0.2 ~ ~
  3. /execute as @e[type=armor_stand,tag=c9_loco,scores={c9_train=85..135}] at @s run tp @s ~0.2 ~ ~
  4. /execute as @e[type=armor_stand,tag=c9_loco,scores={c9_train=136..}] run tp @s ~-8 ~0.5 ~
  5. /execute as @e[type=armor_stand,tag=c9_loco,scores={c9_train=136..}] run scoreboard players set @s c9_train 0
  6. /execute at @e[type=armor_stand,tag=c9_loco] run tp @e[type=armor_stand,tag=c9_cars] ~ ~ ~
  7. /execute at @e[type=armor_stand,tag=c9_loco] run particle minecraft:campfire_cosy_smoke ~1.05 ~3.3 ~ 0.05 0.15 0.05 0.01 1 force
  8. /execute at @e[type=armor_stand,tag=c9_loco,scores={c9_train=1..50}] run particle minecraft:large_smoke ~1.05 ~3.3 ~ 0.1 0.2 0.1 0.02 2 force
  9. /execute at @e[type=armor_stand,tag=c9_loco,scores={c9_train=85..135}] run particle minecraft:large_smoke ~1.05 ~3.3 ~ 0.1 0.2 0.1 0.02 2 force
  10. /execute at @e[type=armor_stand,tag=c9_loco,scores={c9_train=1..50}] run particle minecraft:electric_spark ~ ~0.1 ~1 0.5 0.05 0.05 0.1 3 force
  11. /execute at @e[type=armor_stand,tag=c9_loco,scores={c9_train=50}] run particle minecraft:cloud ~ ~0.2 ~ 1.5 0.1 1.2 0.05 35 force
  12. /execute at @e[type=armor_stand,tag=c9_loco,scores={c9_train=50}] run playsound minecraft:block.fire.extinguish master @a ~ ~ ~ 0.8 0.8
  13. /execute at @e[type=armor_stand,tag=c9_loco,scores={c9_train=55}] run playsound minecraft:block.bell.use master @a ~ ~ ~ 1.0 1.2
  14. /execute at @e[type=armor_stand,tag=c9_loco,scores={c9_train=84}] run playsound minecraft:block.note_block.flute master @a ~ ~ ~ 1.0 0.7

How it works

Frames from the test run

Autonomous Multi-Car Express Train - frame 1Autonomous Multi-Car Express Train - frame 2Autonomous Multi-Car Express Train - frame 3

Recorded on our own test server: 59 frames at about 9.8 fps. Our image check saw: A custom multi-block train engine pulling two colorful glass-topped carriages moves along a track past a covered station platform while emitting smoke particles.

Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.

Build it in your world

  1. Stand at the centre of a flat area where you want your railway station built.
  2. Run each of the 10 setup commands in chat or via impulse command blocks to build the double-wide track, station platform, and summon the locomotive and carriages.
  3. Place 14 repeating command blocks set to Always Active (or one repeating block feeding 13 chain command blocks) at the same centre reference point.
  4. Paste the 14 loop commands in order into the command blocks.
  5. Watch the express train pull into the station, vent steam from its brakes, ring the departure bell, and continue down the line.

Use it with real players

To allow players to ride the train, summon a minecraft:interaction or invisible saddled pig as an additional passenger on the c9_cars armor stand, or run /execute at @e[type=armor_stand,tag=c9_cars] run tp @a[distance=..3] ~-5 ~1 ~ while the train is moving.

Remove it again 4 commands

  1. /kill @e[tag=c9_t]
  2. /scoreboard objectives remove c9_train
  3. /fill ~-17 ~ ~-5 ~17 ~4 ~2 minecraft:air
  4. /fill ~-17 ~-1 ~-2 ~17 ~-1 ~2 minecraft:grass_block

FAQ

Why use an armor stand instead of a marker entity as the vehicle base?

Marker entities are never sent to the client in network packets, which prevents any passengers riding them from appearing to players. Invisible marker armor stands are synced to clients so all block_display passengers render smoothly.

How can I make the railway track longer?

Extend the /fill commands for the rails and gravel bed, then increase the upper score limits in loop commands 2, 3, 4, and 5 so the train travels for more ticks before resetting.

Commands used

/execute/fill/particle/playsound/scoreboard/setblock/summon/tp

Similar creations

Join 9Minecraft News & Guides