better-random/README.md

21 lines
1.1 KiB
Markdown

Better Random
=======
Or Better PRNG, is a mod which replace Minecraft's default
[Linear congruential generator](https://en.wikipedia.org/wiki/Linear_congruential_generator) (LCG for short, used for generating most of random game events)
and Xoshiro128PlusPlus (used to generate "sequences" aka random generator used for `LootPool`s)
with a better random number generator, [gjrand](https://gjrand.sourceforge.net).
### Features:
* Replaces `RandomSupport#create`, and subsequently, `Entity#random`, `Level#random`, countless other places including mods;
* Replaces `RandomSequence` and `RandomSequences` with versions which use gjrand;
* Replaces `Level#getBlockRandomPos` to use `Level#random`. Previously, `getBlockRandomPos` utilized LCG with even worse properties than one of `Level#random`.
### Compatibility:
Should be compatible with everything that doesn't go around public interfaces vanilla code provide.
Existing `RandomSequence` saved data is left untouched (in meaning that nothing is done to it through code,
but Minecraft continue to load/create it upon server start), and removing Better Random mid-game won't have any side effects.