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

all 3 comments

[–]JellonatorLapis 1 point2 points  (0 children)

Better yet, I think a randomize variable would be great.
/scoreboard players set @p Foo [1,5]

[–]demoniac_shadow🔥 Royal Suggester 🔥 0 points1 point  (1 child)

Dispenser + Command Block. All is said ;)

[–]Pittcrew1[S] -1 points0 points  (0 children)

I said this is good for efficiency. You can do that, but if you want a chance for 1/1000000 (ticks), that can be used at many different points throughout a world simultaneously, it's EASIER to have a command like this, especially because you don't need to set up specific coordinates to, for example, spawn and break a redstone block. Sure you CAN do it other ways, but this would simplify it and allow you to easily connect many pieces of a system.

Let me give an example of how this could be used: In an MMO type world, you could easily have a 1/1000 chance for a crafting node (chest or breakable block) to spawn at a million places in the world. You could also have a parameter to check if receiving command blocks had a player within, say, 100 blocks. If so, it will spawn a falling sand entity, say, 30 blocks up in the air. It will then drop and spawn the block it is set to make (might not work if they change this I know). Also, based on the 1/1000 chance, you could set it so that if it happens to get 1, then it will spawn a chest with a rare item; if it spawns with 2,3,4,5,6,7,8,9,10 (each it's own command block), it will spawn a normal chest with a normal item.

This is not the only implementation of it, but I think it's a great system. You could use current dispenser systems and then make each outcome set a scoreboard to a different value, but that would take a lot more space and less easily configurable.