I recently watched a video of how to use command blocks, and in it this guy showed that you cannot enter a certain place without shears. When he got shears he could walk through.

I know how to do /say, but I don't know how to require shears to walk in a certain block. What do I need to do?


1 Answer 1


Simple, just use the updated /clear command. Here's an example of a setup to open an iron door:

#1 /setblock <x> <y> <z> redstone_block 0 destroy
#2 /clear @a[r=10] <item id> 0 0 {display:{Name:"<custom item name>"}}

Here's the setup of the command blocks:

[] = iron door
{} = comparator
() = redstone_block
#1 = command block 1
#2 = command block 2


To explain exactly how this works, I'll go command by command. The first command block sets up a constant redstone loop, which will be constantly activating command block two. Command block two is testfor the item in the player's hand if the player is within a radius of ten blocks. Then command block two outputs a redstone signal which activates the iron door. Also, here are a few commands you might want to run in order to not lag your world:

/gamerule commandBlockOutput false
/gamerule doTileDrops false

Lastly you must play in the latest snapshot of minecraft for this to correctly work. I hope this helps!

Not the answer you're looking for? Browse other questions tagged .