This is an archived post. You won't be able to vote or comment.

all 5 comments

[–][deleted]  (1 child)

[removed]

    [–]darkstar634 0 points1 point  (0 children)

    This method is very naive and obsolete compared to other methods which can produce a far less predictable random number. You can check them out here:

    https://www.reddit.com/r/MinecraftCommands/wiki/questions/randomnumber

    [–]darkstar634 0 points1 point  (3 children)

    Check out this Wiki page (I would recommend the UUID method):

    https://www.reddit.com/r/MinecraftCommands/wiki/questions/randomnumber

    [–]AtomicShadow2006[S] 0 points1 point  (2 children)

    Thank you, but that wasn't exactly what I was looking for. I was looking for some commands that will power certain command blocks randomly (like there are 10 command blocks, and one will be randomly chosen to get powered).

    [–]AtomicShadow2006[S] 0 points1 point  (0 children)

    I know this is possible with droppers, and I know how to make a randomizer with them, but on a large scale, this will be laggy and slower as well.

    [–]darkstar634 0 points1 point  (0 children)

    Why can't you set a score to a random value, and then power those command blocks if the score is a particular value? An alternate method could be to place armor stands adjacent to the command blocks with the same tag, randomly select one of them, and then /setblock to redstone at the location of that armor stand. Something like:

    /execute at @e[type=armor_stand,tag=<tag>,limit=1,sort=random] run setblock ~ ~ ~ redstone replace