Pattern-Weaving Grid Walker

Watch Langton's Ant come alive in Minecraft as a glowing magenta prism darts over white concrete, flipping tiles through cyan and purple in a growing mosaic.

Java EditionComplex Contraptions & CinematicsEasy20 commandsTested on a real 26.2 & 26.3 server
A glowing magenta and cyan walker creates a colorful tile pattern on a white Minecraft arena. Download the GIF Video & GIF © www.9minecraft.net

SimulationsTechnologyMysticWhiteCyanPurpleLearningDecorationBlock displaysSmooth animation (interpolation)Summoned mobsBlock building (fill/setblock/clone)Rotation math13-20 commands

A glowing magenta prism with a spinning cyan core glides across a bright white concrete arena, cycling every floor tile it visits from white to cyan, then purple, and back to white. At each step it turns ninety degrees left or right based on the color beneath it, weaving an intricate mosaic out of simple rules.

Even though the walker only reads one block at a time, its three-color rule set quickly builds overlapping spirals and geometric pathways across the floor.

1. Setup - type these once 6 commands

  1. /fill ~-13 ~-1 ~-13 ~13 ~-1 ~13 minecraft:sea_lantern
  2. /fill ~-12 ~-1 ~-12 ~12 ~-1 ~12 minecraft:white_concrete
  3. /fill ~-5 ~6 ~-5 ~5 ~6 ~5 minecraft:light[level=15]
  4. /scoreboard objectives add c9_col dummy
  5. /execute align xz run summon minecraft:block_display ~0.5 ~ ~0.5 {Tags:["c9_ant"],Glowing:1b,glow_color_override:16711935,teleport_duration:1,block_state:{Name:"minecraft:magenta_glazed_terracotta"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.9f,1.2f,0.9f],translation:[-0.45f,0.05f,-0.45f]}}
  6. /execute align xz run summon minecraft:block_display ~0.5 ~ ~0.5 {Tags:["c9_ant_core"],Glowing:1b,glow_color_override:65535,teleport_duration:1,block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.5f,0.5f,0.5f],translation:[-0.25f,1.4f,-0.25f]}}

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

  1. /execute as @e[tag=c9_ant] run scoreboard players set @s c9_col 0
  2. /execute as @e[tag=c9_ant] at @s if block ~ ~-1 ~ minecraft:white_concrete run scoreboard players set @s c9_col 1
  3. /execute as @e[tag=c9_ant] at @s if block ~ ~-1 ~ minecraft:cyan_concrete run scoreboard players set @s c9_col 2
  4. /execute as @e[tag=c9_ant] at @s if block ~ ~-1 ~ minecraft:purple_concrete run scoreboard players set @s c9_col 3
  5. /execute as @e[tag=c9_ant,scores={c9_col=1}] at @s run setblock ~ ~-1 ~ minecraft:cyan_concrete
  6. /execute as @e[tag=c9_ant,scores={c9_col=1}] at @s run tp @s ~ ~ ~ ~90 ~
  7. /execute as @e[tag=c9_ant,scores={c9_col=2}] at @s run setblock ~ ~-1 ~ minecraft:purple_concrete
  8. /execute as @e[tag=c9_ant,scores={c9_col=2}] at @s run tp @s ~ ~ ~ ~-90 ~
  9. /execute as @e[tag=c9_ant,scores={c9_col=3}] at @s run setblock ~ ~-1 ~ minecraft:white_concrete
  10. /execute as @e[tag=c9_ant,scores={c9_col=3}] at @s run tp @s ~ ~ ~ ~90 ~
  11. /execute as @e[tag=c9_ant] at @s unless block ^ ^-1 ^1 minecraft:sea_lantern run tp @s ^ ^ ^1
  12. /execute as @e[tag=c9_ant] at @s run tp @e[tag=c9_ant_core] ~ ~ ~
  13. /execute as @e[tag=c9_ant_core] at @s run tp @s ~ ~ ~ ~20 ~
  14. /execute as @e[tag=c9_ant] at @s run particle minecraft:dust{color:[1.0,0.2,0.9],scale:1.6} ~ ~0.7 ~ 0.25 0.35 0.25 0 8

How it works

Frames from the test run

Pattern-Weaving Grid Walker - frame 1Pattern-Weaving Grid Walker - frame 2Pattern-Weaving Grid Walker - frame 3

Recorded on our own test server: 59 frames at about 9.7 fps. Our image check saw: A glowing magenta prism with a cyan top moves across a large white floor, leaving behind a growing mosaic pattern of cyan and purple tiles with pink particle trails.

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. Find a flat open area at least 30x30 blocks and stand at the center on the block above the ground.
  2. Run the six setup commands once in chat (or from impulse command blocks) to build the lit concrete arena and summon the walker.
  3. Place 14 command blocks in a chain starting with a Repeating, Unconditional, Always Active block followed by 13 Chain, Unconditional, Always Active blocks.
  4. Paste the 14 loop commands into the command blocks in the exact order listed.
  5. Watch the walker weave cyan and purple patterns across the floor; run the remove commands whenever you want to clear the arena.

Remove it again 5 commands

  1. /kill @e[tag=c9_ant]
  2. /kill @e[tag=c9_ant_core]
  3. /scoreboard objectives remove c9_col
  4. /fill ~-13 ~-1 ~-13 ~13 ~-1 ~13 minecraft:grass_block
  5. /fill ~-5 ~6 ~-5 ~5 ~6 ~5 minecraft:air

FAQ

Why does the loop store the tile color in a scoreboard first?

If a tile changed from white to cyan and then another command immediately checked for cyan in the same tick, the walker would double-flip the tile. Storing <code>c9_col</code> first guarantees only one transition runs per tick.

Can I change the pattern rules?

Yes. Swap <code>~90</code> and <code>~-90</code> in the rotation commands for white, cyan, or purple to try different three-color Langton's Ant rule sets such as RLL or RRL.

Commands used

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

Similar creations

Join 9Minecraft News & Guides