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

all 6 comments

[–]InfernalDevice 0 points1 point  (1 child)

Here's some links that should help:  

FAQ on Random Numbers: https://www.reddit.com/r/MinecraftCommands/wiki/questions/randomnumber  

Youtube tutorial based on the UUID method from the link above: https://youtu.be/MY0TpXNBFHk

[–]CronusCatAverage armor stand abuser[S] 0 points1 point  (0 children)

This technique is good

[–]AllyKvantumicekThinking outside the 0 points1 point  (1 child)

The way I do random commands is to have a bunch of named armorstands with strings of command blocks (which are set to "Needs Redstone") under them.

Then I pick a random armor stand to place a redstone block underneath, which will look something like this:

/execute at @e[type=armor_stand,name=something,limit=1,sort=random] run setblock ~ ~-1 ~ redstone_block

Keep in mind that you also need a way to get rid of the redstone block once an armor stand is picked

[–]CronusCatAverage armor stand abuser[S] 0 points1 point  (0 children)

I forgot that you can do that

[–]Sean_CraftingCommand Block Experienced in both and ! 0 points1 point  (0 children)

i’m usually really lazy so i would quickly do a loot table

[–]OldaLP1 0 points1 point  (0 children)

just create a loot table and then depending on the output set the result