
RNG with game time Datapack
Russian gamers, meet this modest datapack that provides you with a random number generation function based solely on in-game time.
How it Works
The system creates random values using three parameters: current game time, offset, and the specified range. The range defaults to 1 if you didn't specify it or entered a negative number or zero.
Setting the Range
To define the boundaries for random numbers, use the command:
/scoreboard players set rng.range rng <range value>
This setting allows you to get numbers from 0 to (rng.range - 1). For example, with a range of 10 set, you'll receive values from 0 to 9.
Generating Numbers
When you need to get a random number, simply execute:
/function rng:rng
The result will be stored in the scoreboard named rng.rng
, from where you can use it for your projects.