Procedural Yellow Backrooms Maze Generator

Watch an empty platform transform into a glowing Backrooms maze as four autonomous builder entities carve corridors, wallpaper walls, and install lights.

Java EditionComplex Contraptions & CinematicsHard25 commandsTested on a real 26.2 & 26.3 server
Four glowing builder drones procedurally generate a yellow Backrooms maze with terracotta walls and froglight fixtures. Download the GIF Video & GIF © www.9minecraft.net

Self-building StructuresHorrorTechnologyYellowWhiteBuilding ToolAdventure MapMini-gameBlock displaysItem displaysArmor standsRiding & passengersBlock building (fill/setblock/clone)Rotation math21+ commands

This command creation generates a sprawling Backrooms labyrinth right before your eyes. Starting from a central glowing core, four autonomous builder drones roam outward in cardinal directions, laying down damp yellow wool carpets, erecting striped terracotta and oak wallpaper walls, and wiring up ochre froglight ceiling fixtures.

Because the builders use randomized pathfinding and check for unvisited floor tiles before carving, every run produces a completely unique layout of rooms and intersecting hallways.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_timer dummy
  2. /scoreboard objectives add c9_rng dummy
  3. /fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 stripped_birch_wood
  4. /fill ~-16 ~ ~-16 ~16 ~4 ~16 air
  5. /fill ~-3 ~ ~-3 ~3 ~2 ~3 yellow_terracotta
  6. /fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 yellow_wool
  7. /fill ~-1 ~ ~-1 ~1 ~2 ~1 air
  8. /setblock ~ ~3 ~ ochre_froglight
  9. /summon item_display ~ ~1.5 ~ {Tags:["c9_ent","c9_core"],Glowing:1b,glow_color_override:16766720,item:{id:"minecraft:ochre_froglight",count:1},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.2f,1.2f,1.2f]}}
  10. /summon armor_stand ~ ~ ~ {Tags:["c9_ent","c9_b"],Invisible:1b,NoGravity:1b,Marker:1b,Rotation:[0f,0f],Passengers:[{id:"minecraft:block_display",Tags:["c9_ent"],Glowing:1b,glow_color_override:16776960,block_state:{Name:"minecraft:shroomlight"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.4f,0.8f,-0.4f],scale:[0.8f,0.8f,0.8f]}}]}

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

  1. /execute if score #total c9_timer matches 0..2 run summon armor_stand ~ ~ ~ {Tags:["c9_ent","c9_b"],Invisible:1b,NoGravity:1b,Marker:1b,Rotation:[90f,0f],Passengers:[{id:"minecraft:block_display",Tags:["c9_ent"],Glowing:1b,glow_color_override:16776960,block_state:{Name:"minecraft:shroomlight"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.4f,0.8f,-0.4f],scale:[0.8f,0.8f,0.8f]}}]}
  2. /scoreboard players add #tick c9_timer 1
  3. /scoreboard players add #total c9_timer 1
  4. /execute as @e[tag=c9_core] at @s run tp @s ~ ~ ~ ~6 ~
  5. /execute as @e[tag=c9_b] at @s run particle dust{color:[1.0,0.9,0.2],scale:1.6} ~ ~1.4 ~ 0.3 0.5 0.3 0 4 force
  6. /execute if score #tick c9_timer matches 4.. as @e[tag=c9_b] at @s positioned ^ ^ ^4 unless entity @e[tag=c9_core,distance=..14] at @s run tp @s ~ ~ ~ ~180 ~
  7. /execute if score #tick c9_timer matches 4.. as @e[tag=c9_b] at @s positioned ^ ^ ^4 if entity @e[tag=c9_core,distance=..14] at @s if block ^ ^-1 ^4 stripped_birch_wood run fill ^-3 ^ ^1 ^3 ^2 ^7 yellow_terracotta keep
  8. /execute if score #tick c9_timer matches 4.. as @e[tag=c9_b] at @s positioned ^ ^ ^4 if entity @e[tag=c9_core,distance=..14] at @s if block ^ ^-1 ^4 stripped_birch_wood run fill ^-3 ^1 ^1 ^3 ^1 ^7 stripped_oak_log replace yellow_terracotta
  9. /execute if score #tick c9_timer matches 4.. as @e[tag=c9_b] at @s positioned ^ ^ ^4 if entity @e[tag=c9_core,distance=..14] at @s if block ^ ^-1 ^4 stripped_birch_wood run fill ^-1 ^-1 ^-1 ^1 ^-1 ^5 yellow_wool
  10. /execute if score #tick c9_timer matches 4.. as @e[tag=c9_b] at @s positioned ^ ^ ^4 if entity @e[tag=c9_core,distance=..14] at @s if block ^ ^3 ^4 air run fill ^-1 ^ ^-1 ^1 ^2 ^5 air
  11. /execute if score #tick c9_timer matches 4.. as @e[tag=c9_b] at @s positioned ^ ^ ^4 if entity @e[tag=c9_core,distance=..14] at @s run setblock ^ ^3 ^4 ochre_froglight
  12. /execute if score #tick c9_timer matches 4.. as @e[tag=c9_b] at @s store result score @s c9_rng run random value 1..3
  13. /execute if score #tick c9_timer matches 4.. as @e[tag=c9_b] at @s positioned ^ ^ ^4 if entity @e[tag=c9_core,distance=..14] at @s run tp @s ^ ^ ^4 ~90 ~
  14. /execute if score #tick c9_timer matches 4.. as @e[tag=c9_b,scores={c9_rng=1}] at @s run tp @s ~ ~ ~ ~-90 ~
  15. /execute if score #tick c9_timer matches 4.. run scoreboard players set #tick c9_timer 0

How it works

Frames from the test run

Procedural Yellow Backrooms Maze Generator - frame 1Procedural Yellow Backrooms Maze Generator - frame 2Procedural Yellow Backrooms Maze Generator - frame 3

Recorded on our own test server: 69 frames at about 9.7 fps. Our image check saw: A top-down view shows a yellow Backrooms-style maze with froglights being actively generated by four glowing marker entities moving around.

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 with at least 18 blocks of clearance in every direction.
  2. Run each of the 10 setup commands in chat in order to create the scoreboard objectives, base floor, starting hub room, and the first builder.
  3. Place 15 repeating command blocks (or 1 repeating command block chained into 14 chain command blocks, all set to Always Active) near the area.
  4. Paste the 15 loop commands in order into the command blocks.
  5. Watch the four glowing shroomlight builders roam outward and construct the yellow maze in real time.
  6. To reset or clean up the maze, turn off the repeating command blocks and run the remove commands.

Use it with real players

To center the maze generation around yourself instead of the fixed stage center, summon the c9_core entity at your position and run the initial floor setup command around your coordinates. You can also enclose the roof completely by running /fill ~-16 ~3 ~-16 ~16 ~3 ~16 smooth_sandstone keep once the builders finish carving the corridors.

Remove it again 5 commands

  1. /kill @e[tag=c9_ent]
  2. /fill ~-16 ~ ~-16 ~16 ~4 ~16 air
  3. /fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 grass_block
  4. /scoreboard objectives remove c9_timer
  5. /scoreboard objectives remove c9_rng

FAQ

Why doesn't the maze have a solid ceiling covering every corridor?

The ceiling is left open except for the floating ochre froglights so you can watch the glowing builder drones carve out the interior corridors from above.

Can I make the maze generate faster or slower?

Yes! Change the number 4 in the loop commands (where it says matches 4..) to a lower number like 2 for faster generation, or a higher number like 10 for slower step-by-step building.

Commands used

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

Similar creations

Join 9Minecraft News & Guides