3

How can I make a redstone door that only allows one person through at a time?

I have made several efforts to solve by myself.

I realise that a simple button iron/wooden door will not work, as the door stays open long enough for multiple people to pass through.

I realise too that even by using a monostable circuit to open the door people can pass through simultaneously.

I've tried relying on the glitchiness of servers to help, for example I tried using a "dropper" style door, where people press a button, fall through a hole opened beneath them and a slime block underneath bounces them out. However, this is not consistent enough.

I've tried chaining multiple iron doors, but any method I thought of suffered the same problems as single iron doors.

I will implement this on a 1.10 server, so I tried relying too on the entity pushing feature, by having two adjacent pressure plates, of which only one can be triggered to open the door, hoping that players would push each other onto adjacent plates. However, this doesn't happen consistently, and the door still opens to two players, and while it is open players can rush in from elsewhere.

7
  • 1
    Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins!
    – Frank
    Oct 6 '16 at 16:27
  • So what have you tried, then? Just saying you have doesn't help us help you at all. Show us what you've tried. That goes an incredibly long way.
    – Frank
    Oct 6 '16 at 16:55
  • 1
    @Frank I have tried everything I can conceive of. Listing them here would take too long, like a couple hours' work simply making the list, and quadruple that if you also want explanations on each. Oct 6 '16 at 16:57
  • 1
    @Frank yeah okay done Oct 6 '16 at 17:09
  • 3
    I don't think any contraptions would work because there's always the possibility of 2 people moving "as one". It's been a while since I last played mc, but the fact that "ghost collision" is a thing makes the problem a lot harder.
    – Karlyr
    Oct 6 '16 at 17:34
2

Here is a non-command-blocky solution:

enter image description here

Notes:

  • "I" stands for input, "O" for output.
  • I think it could be better if you placed the block over the pressure plate one meter higher, but I didn't find any difference while testing either version.
  • "2-block-high" means there are 2 air blocks in between the roof and the floor.
  • It works almost perfectly; If a player is more than cca. 0.1 - 0.05 blocks behind the first player, he won't get in.
  • I used two shades of green wool and glass just to make the image more easy to understand.
  • A more reliable version:

Does anybody ever read this? If yes, contact me in the comments.

Edit: From Minecraft 1.10, entities push each other away, so players can't run at the same time through, that means that this works 100%!

(If you would have any questions, tell me!)

9
  • @theonlygusti got a solution without command blocks :)
    – user143228
    Oct 8 '16 at 15:22
  • Nice! Surely two people can walk together though and pass through? Oct 8 '16 at 15:26
  • @theonlygusti only with really good timing. They would have to be really, really close to each other,.
    – user143228
    Oct 8 '16 at 17:56
  • @Rudoff and this requires sprinting? Oct 8 '16 at 18:10
  • @theonlygusti Yep. You must sprint, and the inconsistent roof height disables sprint-juming. I tried to go slower by exactly 0.2s (via command blocks) and it didn't let me through.
    – user143228
    Oct 8 '16 at 18:22
1

Since in 1.10 entities push each other away, you can use this ultra simple contraption.

enter image description here

All you need to do is to wire redstone to determine if you want to have a delay between the doors opening.

0

I found two solutions, both using command blocks:

1. The more reliable solution, worked always on my server when I was testing it:

entered image description is here

The commands, from left to right:

testfor @a[r=3]

testforblock ~ ~ ~+1 minecraft:repeating_command_block -1 {SuccessCount:2}

/tp @a[c=1,r=5] ~ ~ ~-10

Explnation:

  • left (repeat command block): /testfor's for players around. Returns number of players around.

  • middle (repeat command block): Gets the number of players from the left command block (in this case one block towards positive Z, you might have it else). Powers the right command block if the number of players is 2 or more.

  • right (chain command block): Teleports the closest player away.

This solution worked even when the players were less then 0.0003 blocks apart. When there is only 1 player, nothing happens - no teleportation. I guess it won't work for 3 players though...


2. The less reliable solution, worked almost always on my server when I was testing it, but works for more players at once:

entered image description here

And the command is...

/tp @e[c=1,r=3] ~ ~ ~-10

Set the repeater to 3.

This will teleport any player(s) that's too close. You must sprint in order to not get teleported. But if two players are almost completely in each other and are sprinting, then they will both pass. In other words, if the first player is sprinting, all the players behind him will get teleported away.


2.1. The fallback version. This is for people not using Minecraft 1.9+:

entered image description here

The command is the same like in version 2 (/tp @e[c=1,r=3] ~ ~ ~-10), all repeaters set to minimum delay.


So if you're going for complete efficiency, use method 1, if you want to stop crowds of players going at once, use method 2, if you are playing mods on an older version then 1.9 (meh), use version 2.1.

2
  • 1
    No command blocks, with command blocks it is easy af. I need a pure redstone/vanilla game mechanics solution. Oct 8 '16 at 14:15
  • @theonlygusti Ok, will search for one.
    – user143228
    Oct 8 '16 at 14:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.