Minecraft Java Edition – How to Stop a Minecart at a Random Moment?

minecraft-java-editionminecraft-redstone

I'm working on a roulette table on a server that I'm playing on, inspired by MagmaMusen's video on YouTube:

It uses a minecart with an armor stand inside it. The minecart is not visible, but the top of the iron helmet on the armor stand is visible like a moving square on top of the diferent-coloured carpets above the minecart. The minecart goes in a circle (about 3×3 blocks big) on powered rails, until a player flicks a lever and stops the minecart by turning off the rails.

The main flaw of this is that the moment the roulette stops isn't random. This could cause some arguing between the players. How can I avoid this problem? Is it possible to have a button that will stop the rails at a random moment instead of the lever?

It would also be nice if you could avoid using too complicated redstone circuits and command blocks.

Note:
You can check out MagmaMusen's video "How to make a Working Roulette Table" if you didn't get the way it works from my explanation.

Best Answer

You want a system that will use a random feature of the game. I used dispensers. The redstone on the image looks a bit big, but I just placed the parts of it farther away to look less complicated. Here's some images:

The Redstone

Now, let's dig deeper:

  1. Start button

  2. Button Switch. Each time the input signal goes off, the output signal changes (goes on if it was off and vice versa) - something like a button to lever converter. Here's how it works:

Button switch

The input must power both pistons at once.

  1. Fast Redstone clock

  2. Piston on/off switch for the clock

  3. Randomizer. There's a dispenser with 8 stacks of items which won't pass through the water (eg. chicken eggs or snowballs) and 1 stack which will (normal items). The system will power the Dispenser each second until a shooted item powers the pressure plate. To reset it just go to the sign and collect the item. A screenshot:

Random.

  1. Roulette (minecart stopper)

  2. Signal shortener - basically a lever to button converter. This sends a short signal each time it's powered.

  3. Minecart releaser. This will release the Minecart onto the roulette rail.