Seamless Sliding Castle Door

Build a smooth spruce and gold castle gate in Minecraft Java Edition using block_display entities and transformation interpolation instead of bulky redstone.

Java EditionHolograms & Display EntitiesMedium21 commandsTested on a real 26.2 & 26.3 server
An armored guard walks through a stone archway as a wooden door slides open. Download the GIF Video & GIF © www.9minecraft.net

Machines & MechanismsMedievalRoyalGoldOrangeMap MakingAdventure MapDecorationBlock displaysArmor standsSmooth animation (interpolation)Riding & passengersBlock building (fill/setblock/clone)Glowing outlines21+ commands

Traditional redstone piston doors move one rigid block at a time and need large circuits hidden behind your walls. By using block_display entities and transformation interpolation, this heavy spruce and gold castle gate parts down the middle and slides smoothly into the stone archway in a single fluid motion.

In this self-running demo, an armored guard approaches the gate, triggering the two halves to glide open with golden dust particles and sound effects before sliding shut again once the guard passes through.

1. Setup - type these once 9 commands

  1. /scoreboard objectives add c9_door dummy
  2. /fill ~-5 ~-1 ~-2 ~5 ~-1 ~2 stone_bricks
  3. /fill ~-5 ~ ~-1 ~5 ~5 ~1 stone_bricks
  4. /fill ~-4 ~5 ~-1 ~4 ~5 ~1 chiseled_stone_bricks
  5. /fill ~-2 ~ ~-1 ~1 ~3 ~1 air
  6. /summon marker ~ ~ ~ {Tags:["c9_door","c9_ctrl"]}
  7. /summon armor_stand ~-0.5 ~ ~3.5 {Tags:["c9_door","c9_actor"],NoGravity:1b,Glowing:1b,ShowArms:1b,Rotation:[180f,0f],equipment:{head:{id:"minecraft:golden_helmet",count:1},chest:{id:"minecraft:iron_chestplate",count:1},legs:{id:"minecraft:iron_leggings",count:1},feet:{id:"minecraft:iron_boots",count:1},mainhand:{id:"minecraft:iron_sword",count:1}}}
  8. /summon block_display ~-2 ~ ~-0.4 {Tags:["c9_door","c9_left"],interpolation_duration:25,block_state:{Name:"minecraft:stripped_spruce_wood"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[2f,4f,0.8f]},Passengers:[{id:"minecraft:block_display",Tags:["c9_door","c9_left_trim"],interpolation_duration:25,block_state:{Name:"minecraft:gold_block"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[1.55f,1.6f,-0.05f],scale:[0.35f,0.8f,0.9f]}}]}
  9. /summon block_display ~ ~ ~-0.4 {Tags:["c9_door","c9_right"],interpolation_duration:25,block_state:{Name:"minecraft:stripped_spruce_wood"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[2f,4f,0.8f]},Passengers:[{id:"minecraft:block_display",Tags:["c9_door","c9_right_trim"],interpolation_duration:25,block_state:{Name:"minecraft:gold_block"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0.1f,1.6f,-0.05f],scale:[0.35f,0.8f,0.9f]}}]}

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

  1. /execute as @e[tag=c9_ctrl] run scoreboard players add @s c9_door 1
  2. /execute as @e[tag=c9_ctrl,scores={c9_door=140..}] run scoreboard players set @s c9_door 0
  3. /execute if entity @e[tag=c9_ctrl,scores={c9_door=1..35}] as @e[tag=c9_actor] at @s run tp @s ~ ~ ~-0.2 180 0
  4. /execute if entity @e[tag=c9_ctrl,scores={c9_door=71..105}] as @e[tag=c9_actor] at @s run tp @s ~ ~ ~0.2 0 0
  5. /execute if entity @e[tag=c9_ctrl,scores={c9_door=8}] as @e[tag=c9_left] run data merge entity @s {start_interpolation:0,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-1.9f,0f,0f],scale:[2f,4f,0.8f]}}
  6. /execute if entity @e[tag=c9_ctrl,scores={c9_door=8}] as @e[tag=c9_left_trim] run data merge entity @s {start_interpolation:0,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.35f,1.6f,-0.05f],scale:[0.35f,0.8f,0.9f]}}
  7. /execute if entity @e[tag=c9_ctrl,scores={c9_door=8}] as @e[tag=c9_right] run data merge entity @s {start_interpolation:0,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[1.9f,0f,0f],scale:[2f,4f,0.8f]}}
  8. /execute if entity @e[tag=c9_ctrl,scores={c9_door=8}] as @e[tag=c9_right_trim] run data merge entity @s {start_interpolation:0,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[2.0f,1.6f,-0.05f],scale:[0.35f,0.8f,0.9f]}}
  9. /execute if entity @e[tag=c9_ctrl,scores={c9_door=85}] as @e[tag=c9_left] run data merge entity @s {start_interpolation:0,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[2f,4f,0.8f]}}
  10. /execute if entity @e[tag=c9_ctrl,scores={c9_door=85}] as @e[tag=c9_left_trim] run data merge entity @s {start_interpolation:0,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[1.55f,1.6f,-0.05f],scale:[0.35f,0.8f,0.9f]}}
  11. /execute if entity @e[tag=c9_ctrl,scores={c9_door=85}] as @e[tag=c9_right] run data merge entity @s {start_interpolation:0,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[2f,4f,0.8f]}}
  12. /execute if entity @e[tag=c9_ctrl,scores={c9_door=85}] as @e[tag=c9_right_trim] run data merge entity @s {start_interpolation:0,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0.1f,1.6f,-0.05f],scale:[0.35f,0.8f,0.9f]}}

How it works

Frames from the test run

Seamless Sliding Castle Door - frame 1Seamless Sliding Castle Door - frame 2Seamless Sliding Castle Door - frame 3

Recorded on our own test server: 66 frames at about 9.4 fps. Our image check saw: An armored figure walks through a stone brick archway as a spruce and gold double door slides smoothly into the surrounding walls.

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 area where you want the castle archway to be built.
  2. Run each of the 9 setup commands once in order to build the stone brick wall, summon the controller and guard, and create the two display door panels.
  3. Place 12 repeating command blocks set to Always Active near your build.
  4. Paste one loop command into each repeating command block, making sure any coordinate-dependent commands execute positioned at your setup center.
  5. Watch the guard walk through as the spruce and gold doors slide open and closed automatically.

Use it with real players

To make the door open automatically whenever a real player walks near it instead of using the demo timer and armor stand, skip summoning c9_actor and replace the scoreboard condition if entity @e[tag=c9_ctrl,scores={c9_door=8}] with if entity @a[distance=..4] for the opening commands, and unless entity @a[distance=..4] for the closing commands. You can also place and clear barrier blocks inside the doorway so players cannot walk through while the gate is shut.

Remove it again 4 commands

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

FAQ

Can players walk through block_display entities when the door is closed?

Yes, block_display entities do not have collision boxes of their own. If you want physical collision in survival or adventure maps, fill the doorway with barrier blocks when the door closes and replace them with air when it opens.

How do I change how fast the castle door slides open?

Change the interpolation_duration value on the block_display entities in the setup commands. A value of 25 takes 1.25 seconds (25 ticks); lower numbers open faster and higher numbers move slower.

Commands used

/data/execute/fill/scoreboard/summon/tp

Similar creations

Join 9Minecraft News & Guides