Watch a bustling crowd of villagers commute along a paved road, halting at a glowing red traffic signal and marching ahead as it turns green.
Mob ParadesTechnologyIndustrialRedGreenDecorationMap MakingLearningSummoned mobsBlock building (fill/setblock/clone)21+ commands
Even Minecraft villagers need road safety when commuting through a busy town. This command creation builds a crosswalk equipped with an automated overhead traffic signal and a steady stream of commuting villagers walking down a paved stone road.
When the overhead lamp glows emerald green, the villagers march forward across the white zebra stripes. As soon as the signal switches to redstone red and projects a glowing stop line across the pavement, every villager waiting before the crosswalk comes to an orderly halt while villagers already past the crossing continue to their destination.
/scoreboard objectives add c9_timer dummy/scoreboard players set #tick c9_timer 0/fill ~-12 ~-1 ~-2 ~12 ~-1 ~2 stone_bricks/fill ~-12 ~-1 ~-2 ~12 ~-1 ~-2 smooth_stone_slab[type=double]/fill ~-12 ~-1 ~2 ~12 ~-1 ~2 smooth_stone_slab[type=double]/fill ~-2 ~-1 ~-1 ~-1 ~-1 ~1 quartz_block/fill ~-1 ~ ~3 ~-1 ~4 ~3 cobblestone_wall/fill ~-1 ~5 ~ ~-1 ~5 ~3 cobblestone_wall/setblock ~-1 ~4 ~ emerald_block/summon marker ~ ~ ~ {Tags:["c9_ctrl"]}/scoreboard players add #tick c9_timer 1/execute if score #tick c9_timer matches 160.. run scoreboard players set #tick c9_timer 0/execute if score #tick c9_timer matches 0 run setblock ~-1 ~4 ~ emerald_block/execute if score #tick c9_timer matches 80 run setblock ~-1 ~4 ~ redstone_block/execute if score #tick c9_timer matches 0..79 run particle dust{color:[0.1,1.0,0.2],scale:1.5} ~-1 ~4 ~ 0.4 0.4 0.4 0 3 force/execute if score #tick c9_timer matches 80..159 run particle dust{color:[1.0,0.1,0.1],scale:1.5} ~-1 ~4 ~ 0.4 0.4 0.4 0 3 force/execute if score #tick c9_timer matches 80..159 run particle dust{color:[1.0,0.2,0.2],scale:1.0} ~-3 ~0.2 ~ 0.1 0.1 1.4 0 8 force/execute if score #tick c9_timer matches 20 run summon villager ~-11 ~ ~-1 {NoAI:1b,Silent:1b,Rotation:[-90f,0f],Tags:["c9_vil"],VillagerData:{profession:"minecraft:farmer",level:2,type:"minecraft:plains"}}/execute if score #tick c9_timer matches 60 run summon villager ~-11 ~ ~1 {NoAI:1b,Silent:1b,Rotation:[-90f,0f],Tags:["c9_vil"],VillagerData:{profession:"minecraft:librarian",level:2,type:"minecraft:plains"}}/execute if score #tick c9_timer matches 100 run summon villager ~-11 ~ ~ {NoAI:1b,Silent:1b,Rotation:[-90f,0f],Tags:["c9_vil"],VillagerData:{profession:"minecraft:armorer",level:2,type:"minecraft:plains"}}/execute if score #tick c9_timer matches 0..79 as @e[type=villager,tag=c9_vil] at @s run tp @s ~0.12 ~ ~ ~ ~/execute if score #tick c9_timer matches 80..159 as @e[type=villager,tag=c9_vil] at @s unless entity @e[tag=c9_ctrl,dx=8,dy=4,dz=4] run tp @s ~0.12 ~ ~ ~ ~/execute positioned ~11 ~ ~ as @e[type=villager,tag=c9_vil,distance=..2] at @s run particle poof ~ ~1 ~ 0.2 0.4 0.2 0.02 5 force/execute positioned ~11 ~ ~ run kill @e[type=villager,tag=c9_vil,distance=..2]setup #1 Creates the <code>c9_timer</code> scoreboard objective that drives the traffic signal cycle and villager spawn timing.setup #9 Places the initial signal block above the crosswalk and summons a control marker at the centre of the stage to measure the stopping zone.loop #4 Switches the overhead signal block between <code>emerald_block</code> at tick 0 (green light) and <code>redstone_block</code> at tick 80 (red light) on an 8-second cycle.loop #8 Summons villagers with <code>NoAI:1b</code> facing east down the three lanes of the road at staggered intervals so the road stays busy without overflowing.loop #12 During a red light (ticks 80 to 159), only advances villagers whose eastern look-ahead bounding box does not overlap the central <code>c9_ctrl</code> marker, making villagers halt right before the crosswalk while those already across keep walking.loop #14 Cleans up villagers with a puff of smoke once they reach the eastern end of the road so entity counts stay low.


Recorded on our own test server: 58 frames at about 9.5 fps. Our image check saw: Villagers walk along a stone brick road beneath a cobblestone arch with an overhead signal block that changes between redstone red and emerald green with matching particles.
Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.
To make the traffic light enforce rules on real players too, add a repeating command during the red phase (ticks 80..159) that applies slowness to any player standing in the stopping zone before the crosswalk: /execute if score #tick c9_timer matches 80..159 positioned ~-5 ~ ~ run effect give @a[distance=..2.5] slowness 1 10 true.
/kill @e[tag=c9_vil]/kill @e[tag=c9_ctrl]/fill ~-12 ~ ~-3 ~12 ~6 ~4 air/fill ~-12 ~-1 ~-2 ~12 ~-1 ~2 grass_block/scoreboard objectives remove c9_timerSetting NoAI to 1b stops villagers from wandering off the road or turning their heads randomly, allowing the teleport loop commands to move them smoothly in straight lanes.
Increase the reset threshold in loop command 2 (currently 160 ticks, or 8 seconds) and adjust the tick ranges in the red light commands accordingly.
▶Conveyor Belt TilesMob ParadesEasy22 cmds
▶March of the Mech RobotsMob ParadesHard24 cmds
▶Automated Creeper Blast-Mining QuarryMob ParadesMedium24 cmds
▶Da Vinci Ornithopter Griffin AutomatonCustom MobsExpert24 cmds
▶Magnetic Scrap-Yard Juggernaut AssemblyBoss IntrosExpert21 cmds
▶Origami Lotus Swan Lake ProcessionMob ParadesMedium24 cmds