Automated Castle Construction

Build an instant stone brick castle with four corner towers, walls, and a central keep that rise layer by layer out of an arcane foundation circle.

Java EditionHolograms & Display EntitiesHard19 commandsTested on a real 26.2 & 26.3 server
A small stone and deepslate castle with a golden spire surrounded by cyan magical particles. Download the GIF Video & GIF © www.9minecraft.net

Animated BlocksMedievalMysticCyanGoldBlackBuilding ToolCinematicMap MakingItem displaysBlock building (fill/setblock/clone)13-20 commands

Building a castle block by block takes hours, so this command creation automates the entire process with a rising animation. An arcane foundation appears on the ground, and a glowing blue construction grid sweeps upward, printing four corner towers, stone brick outer walls, a deepslate central keep, and a golden spire out of thin air.

It uses a single rising marker entity paired with relative /fill commands and scoreboard timers to construct different sections of the fortress at different heights.

1. Setup - type these once 5 commands

  1. /scoreboard objectives add c9_t dummy
  2. /fill ~-9 ~-1 ~-9 ~9 ~-1 ~9 cobblestone
  3. /fill ~-8 ~-1 ~-8 ~8 ~-1 ~8 polished_andesite
  4. /fill ~-3 ~-1 ~-3 ~3 ~-1 ~3 chiseled_stone_bricks
  5. /summon item_display ~ ~0.5 ~ {Tags:["c9_all","c9_core"],item:{id:"minecraft:enchanting_table",count:1},Glowing:1b,glow_color_override:65535,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.5f,1.5f,1.5f]}}

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

  1. /scoreboard players add #tick c9_t 1
  2. /execute if score #tick c9_t matches 1 run kill @e[type=marker,tag=c9_b]
  3. /execute if score #tick c9_t matches 1 run summon marker ~ ~ ~ {Tags:["c9_all","c9_b"]}
  4. /execute if score #tick c9_t matches 1..115 as @e[type=marker,tag=c9_b] at @s run particle dust{color:[0.2,0.9,1.0],scale:1.8} ~ ~0.2 ~ 7 0.2 7 0 40
  5. /execute if score #tick c9_t matches 1..115 as @e[type=marker,tag=c9_b] at @s run tp @s ~ ~0.1 ~
  6. /execute as @e[type=marker,tag=c9_b] at @s if score #tick c9_t matches 1..75 run fill ~-7 ~ ~-7 ~-5 ~ ~-5 stone_bricks replace air
  7. /execute as @e[type=marker,tag=c9_b] at @s if score #tick c9_t matches 1..75 run fill ~5 ~ ~-7 ~7 ~ ~-5 stone_bricks replace air
  8. /execute as @e[type=marker,tag=c9_b] at @s if score #tick c9_t matches 1..75 run fill ~-7 ~ ~5 ~-5 ~ ~7 stone_bricks replace air
  9. /execute as @e[type=marker,tag=c9_b] at @s if score #tick c9_t matches 1..75 run fill ~5 ~ ~5 ~7 ~ ~7 stone_bricks replace air
  10. /execute as @e[type=marker,tag=c9_b] at @s if score #tick c9_t matches 1..45 run fill ~-6 ~ ~-6 ~6 ~ ~6 stone_bricks outline
  11. /execute as @e[type=marker,tag=c9_b] at @s if score #tick c9_t matches 1..50 run fill ~-6 ~ ~-6 ~6 ~ ~6 cobblestone_wall replace air
  12. /execute as @e[type=marker,tag=c9_b] at @s if score #tick c9_t matches 1..95 run fill ~-2 ~ ~-2 ~2 ~ ~2 deepslate_bricks replace air
  13. /execute as @e[type=marker,tag=c9_b] at @s if score #tick c9_t matches 90..115 run fill ~ ~ ~ ~ ~ ~ gold_block replace air
  14. /execute if score #tick c9_t matches 190.. run scoreboard players set #tick c9_t 0

How it works

Frames from the test run

Automated Castle Construction - frame 1Automated Castle Construction - frame 2Automated Castle Construction - frame 3

Recorded on our own test server: 65 frames at about 9.2 fps. Our image check saw: A small castle with four stone brick corner towers, stone brick walls, a deepslate central keep, and a gold block spire surrounded by glowing cyan 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. Stand at the center of a flat 25x25 area where you want your castle built.
  2. Run the 5 setup commands in chat to create the scoreboard objective, lay the stone foundation, and summon the glowing arcane core.
  3. Place a Repeating Command Block set to Always Active and paste the first loop command into it.
  4. Place 13 Chain Command Blocks (Always Active, Unconditional) connected in a line from the repeating block and paste the remaining loop commands in order.
  5. Watch the blue particle grid sweep upward and construct the towers, walls, keep, and golden spire.
  6. To keep the finished castle permanently instead of looping, omit the final loop command or break the command block chain once the spire finishes.

Use it with real players

To let a player trigger the castle construction by dropping a Nether Star on the ground, remove the last loop command (the loop reset) and add a command block that runs: /execute as @e[type=item,nbt={Item:{id:"minecraft:nether_star"}}] at @s run summon marker ~ ~ ~ {Tags:["c9_all","c9_b"]}, followed by resetting #tick to 1 and killing the dropped item entity.

Remove it again 4 commands

  1. /fill ~-9 ~ ~-9 ~9 ~15 ~9 air
  2. /fill ~-9 ~-1 ~-9 ~9 ~-1 ~9 grass_block
  3. /kill @e[tag=c9_all]
  4. /scoreboard objectives remove c9_t

FAQ

Why does the marker move 0.1 blocks per tick instead of 1 full block?

Moving in 0.1-block steps gives the cyan particle grid a smooth, continuous rising motion while still filling each full block layer as soon as the marker crosses its coordinate boundary.

How do I make the castle wider or taller?

Increase the tick range on the teleport command (for example, 1..160 instead of 1..115) for extra height, and adjust the relative coordinates in the /fill commands to widen the footprint.

Commands used

/execute/fill/kill/particle/scoreboard/summon/tp

Similar creations

Join 9Minecraft News & Guides