![]() |
VOOZH | about |
Random sequences are random number sequence generators used by loot tables and the /random (roll|value) ... command.
Current random sequences in a world and the random sequence settings of the world are stored in the /data/random_sequences.dat, which is a GZip-ed NBT file.
true. Can be changed with /random reset * ... command.true. Can be changed with /random reset * ... command.0. Can be changed with /random reset * ... command.Random sequences are used by a loot table when its seed is not specified. Loot tables in containers from the world generation are not affected by random sequences (but are directly affected by the world seed).
Random sequences use the Xoroshiro128++ random number generator.
When a random sequence is called for the first time, it is created with the seed:
true, XOR the [Int] salt with the world seed.0x6a09e667f3bcc909; The higher 64 bits is the sum of the lower 64 bits and 0x9e3779b97f4a7c15.true, XOR it with the MD5 of the namespaced ID of the creating random sequence.publicstaticlongmixStafford13(longv){ v=(v^v>>>30)*0xbf58476d1ce4e5b9L; v=(v^v>>>27)*0x94d049bb133111ebL; returnv^v>>>31; }
| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.20 | pre1 | Added random sequences. | |||||
| 1.20.2 | 23w31a | Added the three random sequence settings of the world. | |||||
| Changed the way to generating the seed when creating a random sequence. | |||||||