Use a Command Block to Create an Automatic Door in Minecraft in v1.12 Java Edition

Minecraft Command Block Tutorial

***Video updated for Minecraft Java Edition 1.16.4 ****

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