I have searched this forum and the internet, but all the proposed solutions don’t work for one reason or another. Since someone removed the “Minecraft PE” part of my title (Why?), I'm just going to add that iPadOS is the platform I am on.
I built a (somewhat large) hotel/resort in my world, and I was interested in adding a keycard system for the doors. Because of the way the structure is built (and there is no way I am going to remodel something this size), there is only room for three blocks under the door.
Horrible example below:
Is there a way I can create a system to unlock the door when tapped by the player (and only the player) with the key using these four open blocks? There are over 100 doors, and each would need its own key, plus, I would like a master key if that is possible. I would like to avoid the use of mods, but if that is the only way...
If the use of a button is needed, it can be placed on the bottom wall block, but I would rather no button be used. If possible, I would just like the player to tap the door, and the door would open if the player holds the correct key.
Another user posted a solution that incorporates the use of tags, so is there any way I can put a command block under (Or preferable under and to the left of) the door and have the door open if a player with the correct tag/key taps it? If “Tags” are not the best way to do this, that's fine!
Edit: I removed the fact that there is an open block directly to the right of the door because I would rather there not be a non-matching block on the wall next to every door. If a block is needed there (And there is no other way to do this), I guess I would be willing to do it. Thanks again for any suggestions.
Edit 2: Someone suggested having the command blocks elsewhere, and after some thought, I would be willing to do this. My thought on this is to have a room full of command blocks that would somehow ‘talk’ to the door and open it if the player with the key tapped it (or a button next to it). Would anyone know how to do this? Thanks!
Edit 3: Does anyone have anything that could work? At this point I'm willing to accept anything with the command block, even of it requires multiple blocks away from the door. I have unlimited (almost) space away from the door, so let me know what would work! (No, I don't want to create a 20 block system for each door :)