Castle Gate Opening Sequence

Build an automated medieval castle gate in Minecraft Java Edition. Watch a heavy iron portcullis grind open block-by-block with particles and sound effects.

Java EditionHolograms & Display EntitiesEasy24 commandsTested on a real 26.2 & 26.3 server
An iron bar portcullis slowly raises inside a stone brick castle gatehouse with a glowing golden pillar. Download the GIF Video & GIF © www.9minecraft.net

Animated BlocksMedievalRoyalGoldWhiteAdventure MapDecorationCinematicBlock displaysBlock building (fill/setblock/clone)Sounds21+ commands

Every grand medieval build needs an impressive entrance. This command creation constructs a stone brick gatehouse with flanking towers, a cobblestone entryway, and a glowing golden statue waiting inside the courtyard. At the center stands a heavy iron bar portcullis held down by iron chains.

Using a scoreboard timer, the gate slowly grinds upward block-by-block with heavy metallic clanking sounds, puffs of dust, and flying sparks from the winches above. Once fully raised, a bell chimes to welcome visitors before the heavy gate slams back down into the floor.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_timer dummy
  2. /scoreboard players set #gate c9_timer 0
  3. /fill ~-7 ~-1 ~-4 ~7 ~-1 ~6 cobblestone
  4. /fill ~-6 ~ ~-1 ~6 ~8 ~1 stone_bricks
  5. /fill ~-6 ~ ~-2 ~-4 ~10 ~2 chiseled_stone_bricks
  6. /fill ~4 ~ ~-2 ~6 ~10 ~2 chiseled_stone_bricks
  7. /fill ~-7 ~8 ~-2 ~7 ~9 ~2 stone_brick_stairs[facing=south,half=top]
  8. /fill ~-3 ~ ~-2 ~3 ~5 ~2 air
  9. /fill ~-3 ~ ~ ~3 ~5 ~ iron_bars
  10. /summon block_display ~-0.5 ~ ~4.5 {Tags:["c9_statue"],Glowing:1b,glow_color_override:16766720,block_state:{Name:"minecraft:gold_block"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1f,2.5f,1f],translation:[0f,0f,0f]}}

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

  1. /scoreboard players add #gate c9_timer 1
  2. /execute if score #gate c9_timer matches 200.. run scoreboard players set #gate c9_timer 0
  3. /execute if score #gate c9_timer matches 1 run fill ~-3 ~ ~ ~3 ~5 ~ iron_bars
  4. /execute if score #gate c9_timer matches 20 run fill ~-3 ~ ~ ~3 ~ ~ air
  5. /execute if score #gate c9_timer matches 45 run fill ~-3 ~1 ~ ~3 ~1 ~ air
  6. /execute if score #gate c9_timer matches 70 run fill ~-3 ~2 ~ ~3 ~2 ~ air
  7. /execute if score #gate c9_timer matches 95 run fill ~-3 ~3 ~ ~3 ~3 ~ air
  8. /execute if score #gate c9_timer matches 120 run fill ~-3 ~4 ~ ~3 ~4 ~ air
  9. /execute if score #gate c9_timer matches 20..120 run particle smoke ~ ~6 ~ 2 0.2 0.2 0.01 2 force
  10. /execute if score #gate c9_timer matches 20..120 run particle crit ~-3 ~5.5 ~ 0.1 0.1 0.1 0.2 3 force
  11. /execute if score #gate c9_timer matches 20..120 run particle crit ~3 ~5.5 ~ 0.1 0.1 0.1 0.2 3 force
  12. /execute if score #gate c9_timer matches 20..120 if score #gate c9_timer matches ..120 run particle dust{color:[0.6,0.6,0.6],scale:1.5f} ~ ~3 ~ 2 2 0.2 0.01 2 force
  13. /execute if score #gate c9_timer matches 20 run playsound block.iron_door.open master @a ~ ~3 ~ 2 0.5
  14. /execute if score #gate c9_timer matches 70 run playsound block.anvil.place master @a ~ ~4 ~ 1.5 0.6

How it works

Frames from the test run

Castle Gate Opening Sequence - frame 1Castle Gate Opening Sequence - frame 2Castle Gate Opening Sequence - frame 3

Recorded on our own test server: 60 frames at about 9.9 fps. Our image check saw: A stone brick gatehouse with a cobblestone entryway and glowing gold block pillars in front, where an iron bar portcullis raises upward one block with particle effects.

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 an open flat area where you want your castle gatehouse to appear.
  2. Run each of the 10 setup commands in chat one by one to build the stone gatehouse, iron portcullis, and scoreboard objective.
  3. Place a row of 14 repeating command blocks (or 1 repeating command block feeding into 13 chain command blocks) nearby.
  4. Set all command blocks to Always Active.
  5. Paste one loop command into each command block, making sure coordinates are aligned to the center of the gate (or wrap them with execute positioned at your gate center).
  6. Watch the portcullis automatically grind open row by row and reset every 10 seconds.

Use it with real players

To make the gate open only when a player approaches instead of looping continuously, change the first loop command to /execute if entity @a[distance=..8] if score #gate c9_timer matches ..130 run scoreboard players add #gate c9_timer 1, and add a command to reset #gate to 1 whenever no players are within 8 blocks.

Remove it again 4 commands

  1. /kill @e[tag=c9_statue]
  2. /scoreboard objectives remove c9_timer
  3. /fill ~-7 ~ ~-4 ~7 ~10 ~6 air
  4. /fill ~-7 ~-1 ~-4 ~7 ~-1 ~6 grass_block

FAQ

Can I change the speed at which the portcullis opens?

Yes. Adjust the tick numbers in the loop commands (20, 45, 70, 95, 120). Bringing those numbers closer together makes the gate open faster, while spacing them further apart makes it rise more slowly.

Can I use fences instead of iron bars for the portcullis?

Absolutely. Replace every instance of iron_bars in the setup and loop commands with oak_fence, spruce_fence, or chains to fit your castle palette.

Commands used

/execute/fill/particle/playsound/scoreboard/summon

Similar creations

Join 9Minecraft News & Guides