I want to make a fingerprint scanner in minecraft that lets players through a door. I want this to be realistic, so that the player actually has do to something with their hand in order to be let in. I don’t want to stray too far from the point, but this is (in a nutshell) how it works:

  1. The player rotates glass in an item frame.
  2. A command block system detects whether the player should be allowed in and, supposing the player is allowed in;
  3. The glass in the item frame turns green.

I have got part 2, but I need help with part one and three, so, in conclusion:

  1. How do I use /testfor to detect glass rotating in an item frame and;
  2. How do I /setblock green_stained_glass_pane?
  • 1
    "How do I use /testfor to…" Answer: You don't. This is not 1.7, you don't need testfor for everything. You don't need it for anything anymore. And I'm pretty sure you're also using a comparator for that, you also don't need to do that. You don't need any redstone. Aug 5, 2018 at 18:37
  • This is the wiki page that answers your NBT questions: minecraft.gamepedia.com/Chunk_format#Other And for checking and changing NBT, you can use /execute or /data, both also have wiki pages. Aug 5, 2018 at 18:38
  • Ok @FabianRöling so if I don’t need /testfor for part one, do I use /execute or /data?
    – DM01131
    Aug 6, 2018 at 13:03
  • Also I looked at the wiki link and I couldn’t make anything of it.
    – DM01131
    Aug 6, 2018 at 13:07
  • Also In your comment, @FabianRöling, you said ‘Answer’. If you are answering my question, I would really appreciate it if you would take the time to write your answer as an answer, and explain it in a more digestible way as both these commands are fairly new to me. Thanks.
    – DM01131
    Aug 6, 2018 at 13:10

3 Answers 3


For 1, you can either use a /data get entity @e[type=item_frame,limit=1] ItemRotation or a comparator.

For 3, you can simply just use /kill @e [type=item_frame,limit=1] and then /summon ItemFrame <x> <y> <z> {Direction:facingb,Item:{green_stained_glass_pane}} replacing "facing" (leave the letter b as it is) with the way it is facing (0=south, 1=west, 2=north, and 3=east.)

Also, item frames count as entities, not as blocks.

  1. Put a comparator behind the item frame
  2. use a command block to find the redstone level of the comparator or just a regular old password switch will do
  3. Then a simple player testfor command will take it from there
  • Ok, the first part is helpful @Devan S. but please could you expand on the /testfor command and using /setblock command to /setblock stained glass into an item frame?
    – DM01131
    Aug 7, 2018 at 10:18
  • just say /execute @p[name=username] ~ ~ ~ setblock (abs coors)
    – Devan S.
    Aug 7, 2018 at 21:43
  • if you want to be fancy, then /execute @e[type=item_frame,c=1] ~ ~ ~ execute @p[name=username] ~ ~ ~ setblock x y z...
    – Devan S.
    Aug 7, 2018 at 21:45
  • How do you find a player with /execute as testfor was removed?
    – DM01131
    Aug 11, 2018 at 19:37
  • 2
    Why would you check the comparator level instead of the item frame itself? That just introduces a needless delay and restricts your building options, for example the item frame can't hang on a pillar or wall between two rooms anymore. Aug 19, 2018 at 10:26

With command blocks you can use this setup:

  1. First, use a repeating command block that's always active with the command:
/testfor @a <coordinates of block in front of your "scanner".

You can then have a comparator run out of it and into the second command block.

  1. Then a repeating command block which needs redstone:
/testforblock <position of wool block>

Then have a comparator running out of two redstone dust one piece to the left of the first piece and one to the right of the first piece.

  1. Last, place a command block at each end of the redstone dust the one two the left which should say:
/setblock <coordinates of were the wool should be> wool <data value of the color you want>

The right one should say:

/setblock <coordinates of the left of the wool> concrete <data value of lime>

and the front one should say

/setblock <the block under the block under the door> redstone_block

Out of the front and right block should be a comparator 2 repeaters set to four tick and another repeater set to 2 ticks for a 1 second delay attached to both of those should be a command_block. The right one should say:

/setblock <where the lime concrete is> concrete <data value for red>

The front one should say:

/setblock <the block under the block under the door air.
  • 2
    I find your comment confusing and I’m not sure it answers my question
    – DM01131
    Sep 20, 2018 at 19:47
  • 1
    This answer is confusing, as it is a huge run on sentence. It also doesnt use the correct format for the commands mentioned. Aug 19, 2019 at 8:19

You must log in to answer this question.

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