Colossal Fortress Gate

Build an automated castle entrance with a rising iron portcullis and a folding wooden drawbridge over a glowing magma moat using block display entities.

Java EditionHolograms & Display EntitiesMedium24 commandsTested on a real 26.2 & 26.3 server
A wooden drawbridge lowers over glowing magma between two stone gate towers at night. Download the GIF Video & GIF © www.9minecraft.net

Machines & MechanismsMedievalFireOrangeBlackWhiteMap MakingAdventure MapDecorationBlock displaysSmooth animation (interpolation)Block building (fill/setblock/clone)Sounds21+ commands

The Colossal Fortress Gate turns a flat plain into the guarded entrance of a stone citadel. Two bastion towers frame a deep magma-lit moat, while an oversized wooden drawbridge and a heavy iron portcullis move smoothly using block display entities and transformation matrices.

On a repeating cycle, the iron grate slides upward into the archway as the drawbridge rotates down across the lava gap, kicking up sparks, smoke, and debris when the heavy timber slams into place.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_gate dummy
  2. /scoreboard players set #t c9_gate 0
  3. /fill ~-6 ~-1 ~-2 ~6 ~-1 ~5 cobblestone
  4. /fill ~-6 ~ ~-1 ~6 ~11 ~1 stone_bricks
  5. /fill ~-6 ~ ~-2 ~-4 ~12 ~2 polished_deepslate
  6. /fill ~4 ~ ~-2 ~6 ~12 ~2 polished_deepslate
  7. /fill ~-3 ~ ~-1 ~3 ~7 ~1 air
  8. /fill ~-3 ~-1 ~2 ~3 ~-1 ~5 magma_block
  9. /summon block_display ~ ~ ~0.4 {Tags:["c9_all","c9_port"],interpolation_duration:40,teleport_duration:2,block_state:{Name:"minecraft:iron_bars"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-3.5f,0f,0f],scale:[7f,8f,1f]}}
  10. /summon block_display ~ ~ ~1.5 {Tags:["c9_all","c9_bridge"],interpolation_duration:40,teleport_duration:2,block_state:{Name:"minecraft:spruce_planks"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-3.5f,0f,0f],scale:[7f,7.5f,0.6f]}}

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

  1. /scoreboard players add #t c9_gate 1
  2. /execute if score #t c9_gate matches 180.. run scoreboard players set #t c9_gate 0
  3. /execute if score #t c9_gate matches 10 as @e[tag=c9_port] run data merge entity @s {start_interpolation:0,interpolation_duration:40,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-3.5f,6.5f,0f],scale:[7f,8f,1f]}}
  4. /execute if score #t c9_gate matches 10 as @e[tag=c9_bridge] run data merge entity @s {start_interpolation:0,interpolation_duration:40,transformation:{left_rotation:[0.7071f,0f,0f,0.7071f],right_rotation:[0f,0f,0f,1f],translation:[-3.5f,0.5f,0f],scale:[7f,7.5f,0.6f]}}
  5. /execute if score #t c9_gate matches 100 as @e[tag=c9_port] run data merge entity @s {start_interpolation:0,interpolation_duration:35,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-3.5f,0f,0f],scale:[7f,8f,1f]}}
  6. /execute if score #t c9_gate matches 100 as @e[tag=c9_bridge] run data merge entity @s {start_interpolation:0,interpolation_duration:35,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-3.5f,0f,0f],scale:[7f,7.5f,0.6f]}}
  7. /execute if score #t c9_gate matches 10..50 run particle crit ~-3.2 ~7 ~1.5 0.1 0.2 0.1 0.1 5 force
  8. /execute if score #t c9_gate matches 10..50 run particle crit ~3.2 ~7 ~1.5 0.1 0.2 0.1 0.1 5 force
  9. /execute if score #t c9_gate matches 100..135 run particle large_smoke ~ ~4 ~0.5 3 2 0.2 0.02 6 force
  10. /execute if score #t c9_gate matches 50 run particle campfire_cosy_smoke ~ ~0.2 ~5 3 0.1 2 0.01 45 force
  11. /execute if score #t c9_gate matches 50 run playsound minecraft:entity.iron_golem.hurt master @a ~ ~ ~ 1.5 0.5
  12. /execute if score #t c9_gate matches 135 run particle block{block_state:{Name:"minecraft:stone_bricks"}} ~ ~0.2 ~0.5 3.5 0.2 0.5 0.2 80 force
  13. /execute if score #t c9_gate matches 135 run playsound minecraft:block.anvil.land master @a ~ ~ ~ 1.2 0.6
  14. /particle lava ~ ~-0.2 ~3.5 2.5 0.1 1 0.1 1 force

How it works

Frames from the test run

Colossal Fortress Gate - frame 1Colossal Fortress Gate - frame 2Colossal Fortress Gate - frame 3

Recorded on our own test server: 69 frames at about 9.8 fps. Our image check saw: A stone gate with two towers has a wooden drawbridge that rotates down over magma blocks while an iron bar slides upwards.

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 gatehouse built.
  2. Run each command from the setup list once in chat (or from a single impulse command block at the center) to build the towers, moat, and gate display entities.
  3. Place a repeating command block set to Always Active at the exact same center position, followed by a chain of 13 Chain command blocks (Always Active, Unconditional).
  4. Paste the 14 loop commands in order into the repeating and chain command blocks.
  5. Watch the portcullis rise and the drawbridge fold down automatically every 9 seconds.

Use it with real players

To let players control the gate with a lever instead of running on a timer, remove the first two scoreboard clock commands from the loop. Wire a lever to two impulse command blocks: one that sets #t c9_gate to 10 (or runs the tick 10 /data merge commands directly) to open the gate, and an inverted branch that runs the tick 100 /data merge commands to close it. Note that block displays do not have collision boxes automatically; if you want players to walk across the lowered bridge or be blocked by the portcullis, place and clear minecraft:barrier blocks at the same ticks.

Remove it again 4 commands

  1. /kill @e[tag=c9_all]
  2. /scoreboard objectives remove c9_gate
  3. /fill ~-6 ~ ~-2 ~6 ~12 ~5 air
  4. /fill ~-6 ~-1 ~-2 ~6 ~-1 ~5 grass_block

FAQ

Why can players walk right through the closed iron gate?

Block display entities are purely visual and have no hitbox. For a survival build, pair the opening and closing commands with a /fill command that places or removes barrier blocks inside the archway.

How do I change how fast the drawbridge opens?

Change the interpolation_duration value inside the /data merge commands in the loop. A value of 40 takes 2 seconds (40 game ticks), while 80 takes 4 seconds.

Commands used

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

Similar creations

Join 9Minecraft News & Guides