Minecraft, random number generator

minecraft-java-editionminecraft-redstone

Does anyone know how to modify that random number generator, so that it will get only one lamp on?

I can't use command blocks.

Best Answer

Probably the easiest way to do what you want is to use the contraption you linked to, and hook it up to a binary decoder. This answer will at least get you started with that, but it seems there are designs that are a bit more compact, but slower. For instance, I found this video which does the same thing as the linked answer. Then, the outputs from the binary decoder just need to be inverted, and you'll have your single active line.

There is an issue though, and that is that the inputs and outputs from the decoder must be separated. The input isn't so much of a problem, but it means it's hard to have the output lamps all in a row. It's doable, but by no means is it easy or compact. Another issue is that the number of outputs must be a power of 2 (1, 2, 4, 8, etc.), or else you'll sometimes have no output.