Sliding Dungeon Gate

Build a cinematic sliding deepslate dungeon gate with glowing gilded locking bars that glide smoothly into heavy stone frames using display entities.

Java EditionHolograms & Display EntitiesMedium24 commandsTested on a real 26.2 & 26.3 server
A deepslate dungeon gate with glowing gilded blackstone locking bars slides open amid smoke and blue flame particles. Download the GIF Video & GIF © www.9minecraft.net

Machines & MechanismsMedievalDarkBlackGoldCyanAdventure MapMap MakingCinematicBlock displaysSmooth animation (interpolation)Block building (fill/setblock/clone)21+ commands

Traditional piston doors are blocky and noisy, but block display entities let you create cinematic sliding gates that glide smoothly into stone frames. This command creation builds a monolithic deepslate dungeon archway at the centre of the stage with two massive stone slabs and heavy gilded blackstone locking bars.

As the cycle runs, the glowing golden locks unlatch and slide outward with a burst of soul fire particles. Moments later, the heavy chiseled deepslate doors rumble open into the side pillars, kicking up clouds of stone dust and smoke before sealing shut again.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_timer dummy
  2. /scoreboard players set #gate c9_timer 0
  3. /fill ~-6 ~ ~-1 ~6 ~6 ~1 polished_deepslate
  4. /fill ~-3 ~ ~-1 ~3 ~4 ~1 air
  5. /fill ~-5 ~ ~-2 ~-5 ~6 ~2 deepslate_brick_wall
  6. /fill ~5 ~ ~-2 ~5 ~6 ~2 deepslate_brick_wall
  7. /setblock ~-4 ~5 ~-2 soul_lantern
  8. /setblock ~4 ~5 ~-2 soul_lantern
  9. /summon block_display ~ ~ ~ {Tags:["c9_gate","c9_left_door"],block_state:{Name:"minecraft:chiseled_deepslate"},transformation:{translation:[-3.0f,0.0f,-0.4f],scale:[3.0f,5.0f,0.8f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  10. /summon block_display ~ ~ ~ {Tags:["c9_gate","c9_right_door"],block_state:{Name:"minecraft:chiseled_deepslate"},transformation:{translation:[0.0f,0.0f,-0.4f],scale:[3.0f,5.0f,0.8f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}

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

  1. /execute unless entity @e[tag=c9_lock_top] run summon block_display ~ ~ ~ {Tags:["c9_gate","c9_lock_top"],Glowing:1b,glow_color_override:16755200,block_state:{Name:"minecraft:gilded_blackstone"},transformation:{translation:[-1.5f,2.8f,-0.6f],scale:[3.0f,0.6f,1.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  2. /execute unless entity @e[tag=c9_lock_bot] run summon block_display ~ ~ ~ {Tags:["c9_gate","c9_lock_bot"],Glowing:1b,glow_color_override:16755200,block_state:{Name:"minecraft:gilded_blackstone"},transformation:{translation:[-1.5f,1.2f,-0.6f],scale:[3.0f,0.6f,1.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  3. /scoreboard players add #gate c9_timer 1
  4. /execute if score #gate c9_timer matches 160.. run scoreboard players set #gate c9_timer 0
  5. /execute if score #gate c9_timer matches 10 as @e[tag=c9_lock_top] run data merge entity @s {start_interpolation:0,interpolation_duration:15,transformation:{translation:[-4.5f,2.8f,-0.6f],scale:[3.0f,0.6f,1.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  6. /execute if score #gate c9_timer matches 10 as @e[tag=c9_lock_bot] run data merge entity @s {start_interpolation:0,interpolation_duration:15,transformation:{translation:[1.5f,1.2f,-0.6f],scale:[3.0f,0.6f,1.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  7. /execute if score #gate c9_timer matches 10..25 run particle soul_fire_flame ~ ~2.3 ~-0.7 1.5 0.8 0.2 0.02 6 force
  8. /execute if score #gate c9_timer matches 28 as @e[tag=c9_left_door] run data merge entity @s {start_interpolation:0,interpolation_duration:40,transformation:{translation:[-5.9f,0.0f,-0.4f],scale:[3.0f,5.0f,0.8f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  9. /execute if score #gate c9_timer matches 28 as @e[tag=c9_right_door] run data merge entity @s {start_interpolation:0,interpolation_duration:40,transformation:{translation:[2.9f,0.0f,-0.4f],scale:[3.0f,5.0f,0.8f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  10. /execute if score #gate c9_timer matches 28..68 run particle block{block_state:{Name:"minecraft:deepslate"}} ~ ~0.2 ~ 2.5 0.2 0.6 0.1 15 force
  11. /execute if score #gate c9_timer matches 28..68 run particle campfire_cosy_smoke ~ ~0.1 ~ 2.2 0.1 0.5 0.01 4 force
  12. /execute if score #gate c9_timer matches 100 as @e[tag=c9_left_door] run data merge entity @s {start_interpolation:0,interpolation_duration:35,transformation:{translation:[-3.0f,0.0f,-0.4f],scale:[3.0f,5.0f,0.8f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  13. /execute if score #gate c9_timer matches 100 as @e[tag=c9_right_door] run data merge entity @s {start_interpolation:0,interpolation_duration:35,transformation:{translation:[0.0f,0.0f,-0.4f],scale:[3.0f,5.0f,0.8f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  14. /execute if score #gate c9_timer matches 138 run kill @e[tag=c9_lock_top,limit=1]

How it works

Frames from the test run

Sliding Dungeon Gate - frame 1Sliding Dungeon Gate - frame 2Sliding Dungeon Gate - frame 3

Recorded on our own test server: 60 frames at about 9.9 fps. Our image check saw: A deepslate stone archway has two large stone door slabs and two glowing gold-outlined blackstone bars that slide horizontally to lock and unlock the gate with smoke and soul fire 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 centre of a flat area where you want your dungeon archway to be built.
  2. Run each of the 10 setup commands in order to build the polished deepslate frame, lanterns, and the two oversized door slabs.
  3. Place a chain of 14 command blocks nearby: the first as a Repeating Always Active command block, and the remaining 13 as Chain Always Active command blocks pointing into each other.
  4. Paste the 14 loop commands into the chain in order. Make sure the coordinates reference your archway centre (or wrap them in <code>execute positioned X Y Z run ...</code>).
  5. Watch the gilded locks unlatch with soul fire flames before the stone gates rumble open and closed on a continuous 8-second cycle.

Use it with real players

To make the gate open only when a player approaches instead of looping on a timer, replace the timer increment in loop command 3 with /execute if entity @a[distance=..6] if score #gate c9_timer matches ..68 run scoreboard players add #gate c9_timer 1, and add a second command that resets or reverses the timer when no player is within 6 blocks. You can also place barrier blocks inside the doorway while closed and clear them with /fill once c9_timer reaches 50.

Remove it again 3 commands

  1. /kill @e[tag=c9_gate]
  2. /fill ~-6 ~ ~-2 ~6 ~6 ~2 air
  3. /scoreboard objectives remove c9_timer

FAQ

Can players walk through the closed block display doors?

Yes, block_display entities are visual only and do not have collision boxes. If you want to block players while the gate is shut, fill the doorway with barrier blocks when the gate closes and replace them with air when it opens.

How do I change how fast the heavy stone doors slide open?

Change the interpolation_duration value in loop commands 8 and 9. Higher numbers (like 80) make the stone slabs move more slowly, while lower numbers (like 20) make them snap open quickly.

Commands used

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

Similar creations

Join 9Minecraft News & Guides