Automatic Door

Commands to run once:

Impulse Command Block, command block, Minecraft, cmd, Cimap, one command, Command Blocks

/summon ArmorStand ~ ~ ~ {Tags:["AutoDoor"],NoGravity:1b,Marker:1b,Invisible:1}

Impulse Command Block, command block, Minecraft, cmd, Cimap, one command, Command Blocks

/scoreboard objectives add doorTimer dummy

COLUMN

execute @e[tag=AutoDoor,score_doorTimer_min=7,score_doorTimer=7] ~ ~ ~ /playsound block.piston.contract master @a

execute @e[tag=AutoDoor,score_doorTimer_min=4,score_doorTimer=4] ~ ~ ~ /playsound block.piston.extend master @a

execute @e[tag=AutoDoor,score_doorTimer_min=1,score_doorTimer=1] ~ ~ ~ /playsound block.piston.extend master @a

execute @e[tag=AutoDoor,score_doorTimer_min=8,score_doorTimer=8] ~ ~ ~ fill ~ ~2 ~1 ~ ~2 ~-1 air

execute @e[tag=AutoDoor,score_doorTimer_min=5,score_doorTimer=5] ~ ~ ~ fill ~ ~1 ~1 ~ ~1 ~-1 air

execute @e[tag=AutoDoor,score_doorTimer_min=2,score_doorTimer=2] ~ ~ ~ fill ~ ~ ~1 ~ ~ ~-1 air

execute @e[tag=AutoDoor,score_doorTimer_min=7,score_doorTimer=7] ~ ~ ~ fill ~ ~2 ~1 ~ ~2 ~-1 bone_block

execute @e[tag=AutoDoor,score_doorTimer_min=4,score_doorTimer=4] ~ ~ ~ fill ~ ~1 ~1 ~ ~1 ~-1 bone_block

execute @e[tag=AutoDoor,score_doorTimer_min=1,score_doorTimer=1] ~ ~ ~ fill ~ ~ ~1 ~ ~ ~-1 bone_block

execute @e[tag=AutoDoor] ~ ~ ~ execute @a[rm=2] ~ ~ ~ scoreboard players remove @e[tag=AutoDoor,c=1,score_doorTimer_min=1,score_doorTimer=9] doorTimer 1

execute @e[tag=AutoDoor] ~ ~ ~ execute @a[r=2] ~ ~ ~ scoreboard players add @e[tag=AutoDoor,c=1,score_doorTimer_min=0,score_doorTimer=8] doorTimer 1

execute @e[tag=AutoDoor] ~ ~ ~ execute @a[r=2] ~ ~ ~ scoreboard players add @e[tag=AutoDoor,c=1] doorTimer 0

How it works:

See what's inside of each command block!

Chain Command Block, Green Command Block, Minecraft, cmd, Cimap, one command, Command Blocks
Chain Command Block, Green Command Block, Minecraft, cmd, Cimap, one command, Command Blocks
Chain Command Block, Green Command Block, Minecraft, cmd, Cimap, one command, Command Blocks
Chain Command Block, Green Command Block, Minecraft, cmd, Cimap, one command, Command Blocks
Chain Command Block, Green Command Block, Minecraft, cmd, Cimap, one command, Command Blocks
Chain Command Block, Green Command Block, Minecraft, cmd, Cimap, one command, Command Blocks
Chain Command Block, Green Command Block, Minecraft, cmd, Cimap, one command, Command Blocks
Chain Command Block, Green Command Block, Minecraft, cmd, Cimap, one command, Command Blocks
Chain Command Block, Green Command Block, Minecraft, cmd, Cimap, one command, Command Blocks
Chain Command Block, Green Command Block, Minecraft, cmd, Cimap, one command, Command Blocks
Chain Command Block, Green Command Block, Minecraft, cmd, Cimap, one command, Command Blocks
Repeat Command Block, Blue Command Block, Minecraft, cmd, Cimap, one command, Command Blocks
Cimap Logo. Minecraft Commands.

Cimap

CONTACT:

Contact me for business enquiries.

© Cimap. All Rights Reserved

This website is not endorsed, associated or affiliated with Mojang AB.

Impulse Command Block, command block, Minecraft, cmd, Cimap, one command, Command Blocks
Impulse Command Block, command block, Minecraft, cmd, Cimap, one command, Command Blocks
Impulse Command Block, command block, Minecraft, cmd, Cimap, one command, Command Blocks
Impulse Command Block, command block, Minecraft, cmd, Cimap, one command, Command Blocks
Impulse Command Block, command block, Minecraft, cmd, Cimap, one command, Command Blocks
Impulse Command Block, command block, Minecraft, cmd, Cimap, one command, Command Blocks