Use a Command Block to Create an Automatic Door in Minecraft

Minecraft Command Block Tutorial

Ryan and a student, Caleb, create an automatic door with command blocks in Minecraft. Watch full video with attribution.

Commands used:

/give @p command_block
/testfor @p[r=3,name=MinecraftUserName]

Note: Change MinecraftUserName to your username. Also, capitalization is important so enter the commands the same as you read here.

Disabling Command Block Messages

The following command is not mentioned in the video because it was already active on our server, but it will stop the command blocks from filling up your chat with messages. Changing false to true is a great way to debug what your command block is doing.

/gamerule commandBlockOutput false