Animated Castle Drawbridge & Portcullis

Build a working castle gatehouse in vanilla Minecraft where a heavy wooden drawbridge smoothly lowers across a moat as the iron portcullis rises.

Java EditionHolograms & Display EntitiesMedium24 commandsTested on a real 26.2 & 26.3 server
A stone brick castle gatehouse featuring an animated wooden drawbridge and a sliding iron portcullis. Download the GIF Video & GIF © www.9minecraft.net

Animated BlocksMedievalWaterBlueOrangeBlackMap MakingAdventure MapDecorationBlock displaysSmooth animation (interpolation)Summoned mobsBlock building (fill/setblock/clone)Sounds21+ commands

Every good fortress needs an entrance that feels heavy and mechanical. This command creation builds a stone brick castle gatehouse complete with a water moat, an animated wooden drawbridge, and a sliding iron portcullis that operates automatically on a cycle.

By combining block_display entities with transformation matrices and smooth interpolation, the 3x5 wooden bridge pivots seamlessly around its base hinge over three seconds. As it slams down onto the far bank, a cloud of dust and water splash particles erupts while the iron bars crank upward into the archway.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_timer dummy
  2. /fill ~-5 ~-1 ~-5 ~5 ~-1 ~2 minecraft:water
  3. /fill ~-5 ~ ~2 ~5 ~6 ~4 minecraft:stone_bricks
  4. /fill ~-5 ~7 ~2 ~5 ~7 ~4 minecraft:cobblestone_wall
  5. /fill ~-2 ~-1 ~2 ~2 ~-1 ~4 minecraft:spruce_planks
  6. /fill ~-1 ~ ~2 ~1 ~3 ~4 minecraft:air
  7. /setblock ~-2 ~3 ~1 minecraft:lantern[hanging=true]
  8. /setblock ~2 ~3 ~1 minecraft:lantern[hanging=true]
  9. /summon minecraft:block_display ~-1.5 ~ ~1.5 {Tags:["c9_entity","c9_bridge"],block_state:{Name:"minecraft:spruce_wood"},interpolation_duration:60,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[3f,5f,0.4f],translation:[0f,0f,0f]}}
  10. /summon minecraft:block_display ~-1.5 ~ ~2.9 {Tags:["c9_entity","c9_gate"],block_state:{Name:"minecraft:iron_bars",Properties:{east:"true",west:"true"}},interpolation_duration:50,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[3f,4f,0.2f],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 10 as @e[tag=c9_bridge] run data merge entity @s {start_interpolation:0,interpolation_duration:60,transformation:{left_rotation:[-0.7071f,0f,0f,0.7071f],right_rotation:[0f,0f,0f,1f],scale:[3f,5f,0.4f],translation:[0f,0f,0f]}}
  4. /execute if score #gate c9_timer matches 25 as @e[tag=c9_gate] run data merge entity @s {start_interpolation:0,interpolation_duration:50,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[3f,4f,0.2f],translation:[0f,3.2f,0f]}}
  5. /execute if score #gate c9_timer matches 10..70 if score #gate c9_timer matches ..70 run particle minecraft:crit ~-1.5 ~4 ~1.5 0 0 0 0.1 2
  6. /execute if score #gate c9_timer matches 10..70 if score #gate c9_timer matches ..70 run particle minecraft:crit ~1.5 ~4 ~1.5 0 0 0 0.1 2
  7. /execute if score #gate c9_timer matches 70 run playsound minecraft:entity.zombie.attack_wooden_door master @a ~ ~ ~ 1 0.5
  8. /execute if score #gate c9_timer matches 70 run particle minecraft:campfire_cosy_smoke ~ ~0.2 ~-3.2 1.2 0.1 0.3 0.01 25
  9. /execute if score #gate c9_timer matches 70 run particle minecraft:splash ~ ~0.2 ~-2 1.5 0.1 1.5 0.2 50
  10. /execute if score #gate c9_timer matches 25 run playsound minecraft:block.iron_door.open master @a ~ ~2 ~3 1 0.6
  11. /execute if score #gate c9_timer matches 120 as @e[tag=c9_bridge] run data merge entity @s {start_interpolation:0,interpolation_duration:60,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[3f,5f,0.4f],translation:[0f,0f,0f]}}
  12. /execute if score #gate c9_timer matches 120 as @e[tag=c9_gate] run data merge entity @s {start_interpolation:0,interpolation_duration:50,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[3f,4f,0.2f],translation:[0f,0f,0f]}}
  13. /execute if score #gate c9_timer matches 120 run playsound minecraft:block.iron_door.close master @a ~ ~2 ~3 1 0.6
  14. /execute if score #gate c9_timer matches 180 run playsound minecraft:block.wooden_door.close master @a ~ ~2 ~1.5 1 0.6

How it works

Frames from the test run

Animated Castle Drawbridge & Portcullis - frame 1Animated Castle Drawbridge & Portcullis - frame 2Animated Castle Drawbridge & Portcullis - frame 3

Recorded on our own test server: 58 frames at about 8.2 fps. Our image check saw: A stone brick castle gatehouse is shown with an animated wooden drawbridge tilting upward and an iron bar portcullis sliding down to close the entrance.

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 spot where you want the center of your moat and gatehouse to be built.
  2. Run each of the 10 setup commands in chat or paste them into impulse command blocks triggered at your center point.
  3. Place a column or line of 14 repeating command blocks (or 1 repeating and 13 chain command blocks, all set to Always Active).
  4. Paste the loop commands in order into the command blocks, making sure their execution position is aligned with your setup center.
  5. Watch the drawbridge lower across the water every 10 seconds while the portcullis rises and falls.

Use it with real players

To trigger the drawbridge when a player walks up to the moat instead of on a repeating timer, replace the first two timer commands with a proximity check such as /execute if entity @a[distance=..8] to run the lowering commands, and /execute unless entity @a[distance=..8] to raise it back up. You can also place barrier blocks across the water at ~-1 ~-1 ~-3 ~1 ~-1 ~1 while the bridge is down so players can actually walk across the display entity.

Remove it again 4 commands

  1. /kill @e[tag=c9_entity]
  2. /scoreboard objectives remove c9_timer
  3. /fill ~-5 ~ ~-5 ~5 ~7 ~4 minecraft:air
  4. /fill ~-5 ~-1 ~-5 ~5 ~-1 ~4 minecraft:grass_block

FAQ

Can players walk directly on the lowering drawbridge?

Block display entities are purely visual and do not have collision hitboxes by themselves. To walk across the bridge when it is lowered, place invisible barrier blocks at water level when the timer hits tick 70 and replace them with air at tick 120.

How do I change how fast the drawbridge lowers?

Edit the interpolation_duration value inside the third loop command. It is set to 60 ticks (3 seconds) by default; make sure you also adjust the tick 70 impact sound and particles to match your new duration.

Commands used

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

Similar creations

Join 9Minecraft News & Guides