Automated Rustic Roof Builder

Watch an open timber cottage frame automatically crown itself layer by layer with spaced wooden rafters and overhanging stone brick stairs.

Java EditionMini-games & UtilitiesHard24 commandsTested on a real 26.2 & 26.3 server
Glowing guide entities automatically build a stone brick and spruce roof over a wooden cottage frame. Download the GIF Video & GIF © www.9minecraft.net

Spawners & GeneratorsMedievalNatureGoldWhiteOrangeBuilding ToolMap MakingParticlesBlock displaysArmor standsBlock building (fill/setblock/clone)Glowing outlinesRotation math21+ commands

Two glowing builder guides sweep front to back across an open spruce and cobblestone cottage frame, laying overhanging stone brick stairs and spaced stripped spruce rafters one layer at a time. Warm golden dust particles trace each block as the roof climbs upward to meet a central wooden ridge pole and stone slab cap.

Using two synchronized brush entities and modulo scoreboard math, the entire pitched roof builds itself smoothly without templates or data packs, leaving the lower cottage frame open so you can watch the interior timber trusses take shape.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_roof dummy
  2. /scoreboard players set #fourteen c9_roof 14
  3. /scoreboard players set #two c9_roof 2
  4. /fill ~-4 ~0 ~-5 ~4 ~3 ~5 spruce_log hollow
  5. /fill ~-3 ~1 ~-5 ~3 ~2 ~5 air
  6. /fill ~-4 ~1 ~-4 ~4 ~2 ~4 air
  7. /fill ~-3 ~3 ~-4 ~3 ~3 ~4 air
  8. /fill ~-3 ~0 ~-4 ~3 ~0 ~4 cobblestone
  9. /summon armor_stand ~-5 ~4 ~-6 {Tags:["c9_brush","c9_w","c9_actor"],NoGravity:1b,ShowArms:1b,Glowing:1b,Rotation:[-90f,0f],CustomName:{"text":"Roof Builder","color":"gold"},CustomNameVisible:1b,equipment:{head:{id:"minecraft:golden_helmet",count:1},mainhand:{id:"minecraft:iron_axe",count:1}}}
  10. /summon block_display ~5 ~4 ~-6 {Tags:["c9_brush","c9_e"],Rotation:[90f,0f],Glowing:1b,block_state:{Name:"minecraft:lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.4f,0.2f,-0.4f],scale:[0.8f,0.8f,0.8f]}}

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

  1. /scoreboard players add @e[tag=c9_actor,limit=1] c9_roof 1
  2. /scoreboard players operation #mod14 c9_roof = @e[tag=c9_actor,limit=1] c9_roof
  3. /scoreboard players operation #mod14 c9_roof %= #fourteen c9_roof
  4. /scoreboard players operation #mod2 c9_roof = #mod14 c9_roof
  5. /scoreboard players operation #mod2 c9_roof %= #two c9_roof
  6. /execute if score @e[tag=c9_actor,limit=1] c9_roof matches 1..69 if score #mod14 c9_roof matches 1..13 at @e[tag=c9_w,limit=1] run setblock ~ ~ ~ stone_brick_stairs[facing=east]
  7. /execute if score @e[tag=c9_actor,limit=1] c9_roof matches 1..69 if score #mod14 c9_roof matches 1..13 at @e[tag=c9_e,limit=1] run setblock ~ ~ ~ stone_brick_stairs[facing=west]
  8. /execute if score @e[tag=c9_actor,limit=1] c9_roof matches 15..55 if score #mod14 c9_roof matches 1..13 if score #mod2 c9_roof matches 0 at @e[tag=c9_brush] run setblock ^ ^ ^1 stripped_spruce_wood
  9. /execute if score @e[tag=c9_actor,limit=1] c9_roof matches 44..54 at @e[tag=c9_w,limit=1] run setblock ~2 ~ ~ stripped_spruce_log[axis=z]
  10. /execute if score @e[tag=c9_actor,limit=1] c9_roof matches 57..69 at @e[tag=c9_w,limit=1] run setblock ~1 ~ ~ stone_brick_slab[type=top]
  11. /execute if score @e[tag=c9_actor,limit=1] c9_roof matches 1..69 if score #mod14 c9_roof matches 1..13 at @e[tag=c9_brush] run particle dust{color:[1.0,0.75,0.2],scale:1.5} ~ ~0.6 ~ 0.25 0.25 0.25 0 6 force
  12. /execute if score @e[tag=c9_actor,limit=1] c9_roof matches 1..69 if score #mod14 c9_roof matches 1..13 as @e[tag=c9_brush] at @s run tp @s ~ ~ ~1
  13. /execute if score @e[tag=c9_actor,limit=1] c9_roof matches 14..56 if score #mod14 c9_roof matches 0 as @e[tag=c9_brush] at @s run tp @s ~ ~ ~-13
  14. /execute if score @e[tag=c9_actor,limit=1] c9_roof matches 14..56 if score #mod14 c9_roof matches 0 as @e[tag=c9_brush] at @s run tp @s ^ ^1 ^1

How it works

Frames from the test run

Automated Rustic Roof Builder - frame 1Automated Rustic Roof Builder - frame 2Automated Rustic Roof Builder - frame 3

Recorded on our own test server: 50 frames at about 9.9 fps. Our image check saw: Two glowing floating entities (an armor stand and a lantern) automatically construct a roof made of stone brick stairs and stripped spruce logs over a wooden frame with a cobblestone floor, complete with golden dust 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. Find a flat 15x15 open area and stand at the center block where you want the cottage floor to sit.
  2. Run the ten setup commands in chat in order to create the <code>c9_roof</code> scoreboard, build the open cottage frame, and place the two roof builder guides.
  3. Place 14 command blocks in a chain or line, set the first to Repeating (Always Active) and the rest to Chain (Always Active), or set all 14 to Repeating (Always Active) in execution order.
  4. Paste the 14 loop commands into the command blocks from index 0 to index 13.
  5. Watch as the overhanging stone stairs, wooden rafters, ridge beam, and ridge cap lay themselves layer by layer across the cottage.

Use it with real players

To trigger this on your own survival or creative builds, build a 9x11 timber frame with top beams 3 blocks above the floor, stand at the northwest eave corner (~-5 ~4 ~-6 from your cottage center), and run the two /summon commands relative to that frame after clearing @e[tag=c9_brush]. You can also bind the timer to a real player by replacing @e[tag=c9_actor,limit=1] with @p while keeping c9_w as a separate marker.

Remove it again 3 commands

  1. /fill ~-6 ~0 ~-7 ~6 ~9 ~7 air
  2. /kill @e[tag=c9_brush]
  3. /scoreboard objectives remove c9_roof

FAQ

Can I build the roof out of different blocks like deepslate and oak?

Yes. Replace <code>stone_brick_stairs</code> and <code>stone_brick_slab</code> in the loop commands with any stair and slab pair, and swap <code>stripped_spruce_wood</code> and <code>stripped_spruce_log</code> for your preferred timber.

Why did the builders stop moving after the ridge cap finished?

The builder stops at tick 70 once all five roof layers are complete so your finished cottage stays intact instead of being torn down and rebuilt.

Commands used

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

Similar creations

Join 9Minecraft News & Guides