What does the Random [0,1) block increment in?

Started by NyanMC on

Topic category: Help with modding (Java Edition)

Last seen on 23:48, 14. Feb 2020
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What does the Random [0,1) block increment in?

So, I want to make a lucky block mod through MCreator, but you can't have the luck without RNG, which you can't have without something like Random [0,1). What does that block increment in? Does it go extremely low or does it stop at something like 0.01 (0.01, 0.02, etc.)? An exact stopping point (if its not extremely low) would be appreciated.

Last seen on 03:49, 20. Mar 2020
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
im also making a lucky block…
Mon, 06/24/2019 - 08:55

im also making a lucky block mod, so i looked up some tutorials. im not too sure what the increments are, but i guess using 0.1, 0.2, etc. would be fine. (i havent actually made the rng stuff yet not just bcoz of the same reason as yours, but one of the mobs i tried to add glitched out. )

It gives you a random value…
Tue, 06/25/2019 - 09:09

It gives you a random value between 0 and 0.999999, increment is as big as precission of the double number type, so 64 bit precission.

https://stackoverflow.com/questions/7961788/math-random-explanation

Last seen on 03:49, 20. Mar 2020
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
...so that means HOW many…
Thu, 08/08/2019 - 04:08

...so that means HOW many possibilities?

Theoretically any number…
Thu, 08/08/2019 - 09:17

Theoretically any number between 0 and 1, practically precise enough to call it any number for most cases.