Minecraft: Align command block so that it teleports you into random rooms?

El
- in Worlds
2

I would like to install a mini-game in one of my MC worlds. It should work in such a way that I build 5 or more rooms, the player who has inserted the bet should then be teleported randomly into one of these rooms as soon as he goes into the small hut (there's the command block in the floor that carries out the random teleport) , Now, unfortunately, I'm not aware of any command in which I can enter several destinations and depending on the number (here, for example, 1/5 probability) the player is teleported randomly to one of the locations and I have not played MC for a good 2 years which is why I'm a little out there. Has any of you ever tried something in this direction and knows the command for something like that?

Mfg, thank you in advance for all responses.

Br

I don't know myself very well there, but as far as I know it doesn't work.

What you can do, however, is a small redstone circuit that powers one of two lines at random. You only have to place a CommandBlock at the end, which then teleports the player. How to build the circuit can be found on the Internet, I don't know exactly at the moment.

Be

The best way to do this is to use a teleport as an armor stand.

So: First you go into each of the five rooms to the location where the player is to be teleported and carry out this command.

/ summon minecraft: armor_stand ~ ~ ~ {NoGravity: 1b, Invulnerable: 1b, Small: 1b, Marker: 1b, Invisible: 1b, NoBasePlate: 1b, PersistenceRequired: 1b, Tags: ["tparmorstand_from_gf.net"]}

The teleport command then goes like this:

/ tp @p @e [tag = tparmorstand_from_gf.net, limit = 1, sort = random]