Flatland Fluid Grid

Build a 2D cellular automata fluid simulator inside a vertical glass tank where cyan and blue streams collide with obstacles, slide down slopes, and level out.

Java EditionComplex Contraptions & CinematicsExpert24 commandsTested on a real 26.2 & 26.3 server
Cyan fluid blocks falling and deflecting around blackstone obstacles inside a vertical glass tank. Download the GIF Video & GIF © www.9minecraft.net

SimulationsWaterTechnologyCyanBlueBlackLearningDecorationMap MakingBlock displaysSmooth animation (interpolation)Summoned mobsBlock building (fill/setblock/clone)21+ commands

The Flatland Fluid Grid brings 2D cellular automata physics into Minecraft without using any mods or data packs. Inside a vertical glass tank fitted with angled blackstone deflectors, dual dispensers pour streams of glowing cyan and blue fluid blocks that fall, split around obstacles, slide diagonally down slopes, and level out as they fill the lower basin.

Each fluid droplet is tracked by a smooth-interpolating block display entity paired with real solid wool blocks in the grid. As droplets collide, they check adjacent grid spaces downward, diagonally, and sideways, producing realistic splashes, foam particles, and fluid stacking before draining and resetting for the next cycle.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_timer dummy
  2. /scoreboard objectives add c9_step dummy
  3. /fill ~-8 ~ ~-1 ~8 ~16 ~1 minecraft:glass
  4. /fill ~-7 ~1 ~ ~7 ~15 ~ minecraft:air
  5. /fill ~-8 ~ ~-1 ~8 ~ ~1 minecraft:polished_deepslate
  6. /fill ~-8 ~16 ~-1 ~8 ~16 ~1 minecraft:polished_deepslate
  7. /fill ~-5 ~12 ~ ~-2 ~12 ~ minecraft:polished_blackstone_bricks
  8. /fill ~2 ~12 ~ ~5 ~12 ~ minecraft:polished_blackstone_bricks
  9. /fill ~-2 ~8 ~ ~2 ~8 ~ minecraft:polished_blackstone_bricks
  10. /summon minecraft:marker ~ ~ ~ {Tags:["c9_ctrl","c9_root"]}

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

  1. /scoreboard players add @e[tag=c9_ctrl] c9_timer 1
  2. /scoreboard players add @e[tag=c9_ctrl] c9_step 1
  3. /execute if score @e[tag=c9_ctrl,limit=1] c9_step matches 4.. run scoreboard players set @e[tag=c9_ctrl] c9_step 0
  4. /execute if score @e[tag=c9_ctrl,limit=1] c9_timer matches 240.. run scoreboard players set @e[tag=c9_ctrl] c9_timer 0
  5. /execute if score @e[tag=c9_ctrl,limit=1] c9_timer matches 1..180 if score @e[tag=c9_ctrl,limit=1] c9_step matches 0 if block ~-3 ~15 ~ minecraft:air run summon minecraft:block_display ~-3 ~15 ~ {Tags:["c9_drop","c9_cyan","c9_root"],teleport_duration:2, glowing:1b,glow_color_override:65535,block_state:{Name:"minecraft:cyan_stained_glass"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.92f,0.92f,0.92f],translation:[-0.46f,-0.46f,-0.46f]}}
  6. /execute if score @e[tag=c9_ctrl,limit=1] c9_timer matches 1..180 if score @e[tag=c9_ctrl,limit=1] c9_step matches 2 if block ~3 ~15 ~ minecraft:air run summon minecraft:block_display ~3 ~15 ~ {Tags:["c9_drop","c9_blue","c9_root"],teleport_duration:2,glowing:1b,glow_color_override:33023,block_state:{Name:"minecraft:light_blue_stained_glass"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.92f,0.92f,0.92f],translation:[-0.46f,-0.46f,-0.46f]}}
  7. /execute at @e[type=minecraft:block_display,tag=c9_drop] run setblock ~ ~ ~ minecraft:air
  8. /execute as @e[type=minecraft:block_display,tag=c9_drop] at @s if block ~ ~-1 ~ minecraft:air run tp @s ~ ~-1 ~
  9. /execute as @e[type=minecraft:block_display,tag=c9_drop] at @s unless block ~ ~-1 ~ minecraft:air if block ~-1 ~-1 ~ minecraft:air run tp @s ~-1 ~-1 ~
  10. /execute as @e[type=minecraft:block_display,tag=c9_drop] at @s unless block ~ ~-1 ~ minecraft:air if block ~1 ~-1 ~ minecraft:air run tp @s ~1 ~-1 ~
  11. /execute if score @e[tag=c9_ctrl,limit=1] c9_step matches 0..1 as @e[type=minecraft:block_display,tag=c9_drop] at @s unless block ~ ~-1 ~ minecraft:air if block ~-1 ~ ~ minecraft:air run tp @s ~-1 ~ ~
  12. /execute if score @e[tag=c9_ctrl,limit=1] c9_step matches 2..3 as @e[type=minecraft:block_display,tag=c9_drop] at @s unless block ~ ~-1 ~ minecraft:air if block ~1 ~ ~ minecraft:air run tp @s ~1 ~ ~
  13. /execute as @e[type=minecraft:block_display,tag=c9_drop] at @s run setblock ~ ~ ~ minecraft:cyan_wool keep
  14. /execute at @e[type=minecraft:block_display,tag=c9_drop] run particle minecraft:dust{color:[0.2,0.9,1.0],scale:1.0} ~ ~ ~ 0.2 0.2 0.1 0 1 force

How it works

Frames from the test run

Flatland Fluid Grid - frame 1Flatland Fluid Grid - frame 2Flatland Fluid Grid - frame 3

Recorded on our own test server: 50 frames at about 8.2 fps. Our image check saw: Cyan and blue blocks fall through a vertical glass enclosure, deflecting around a horizontal blackstone bar before landing at the bottom.

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 center of a flat open area where you want the vertical fluid tank to appear.
  2. Run the 10 setup commands in chat or via an impulse command block to build the glass tank, interior deflectors, and controller marker.
  3. Place 14 repeating command blocks in a connected chain or column near the tank and set them all to Always Active.
  4. Paste one loop command into each repeating command block in order from 1 to 14.
  5. Watch the top nozzles dispense cyan and light blue fluid droplets that collide with the blackstone shelves and fill the tank.
  6. To clear the tank or reset the droplets at any time, run the cleanup commands listed below.

Use it with real players

To let players interact with the fluid grid dynamically, give yourself polished blackstone bricks and place or break blocks inside the ~-7 ~1 ~ to ~7 ~15 ~ chamber while the simulation runs; the falling fluid streams will immediately divert around your custom obstacles.

Remove it again 4 commands

  1. /kill @e[tag=c9_root]
  2. /fill ~-8 ~ ~-1 ~8 ~16 ~1 minecraft:air
  3. /scoreboard objectives remove c9_timer
  4. /scoreboard objectives remove c9_step

FAQ

Why does the simulator use both block_display entities and wool blocks?

The wool blocks provide fast grid collision checks using standard if block commands, while the glowing block_display entities with teleport_duration provide smooth interpolated movement and colored overlays.

Can I change the speed of the fluid stream?

Yes. Lower the c9_step reset threshold in loop command 3 from 4.. to 2.. to double the spawn rate of the fluid droplets from both nozzles.

Commands used

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

Similar creations

Join 9Minecraft News & Guides