Provide README
Some checks failed
Build / build (push) Has been cancelled

This commit is contained in:
DBotThePony 2025-03-10 20:29:38 +07:00
parent d28e2d857c
commit e5e8d33401
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -1,25 +1,20 @@
Installation information
Better Random
=======
This template repository can be directly cloned to get you started with a new
mod. Simply create a new repository cloned from this one, by following the
instructions provided by [GitHub](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template).
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).
Once you have your clone, simply open the repository in the IDE of your choice. The usual recommendation for an IDE is either IntelliJ IDEA or Eclipse.
### Features:
* Replaces `Level#random`;
* 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`.
If at any point you are missing libraries in your IDE, or you've run into problems you can
run `gradlew --refresh-dependencies` to refresh the local cache. `gradlew clean` to reset everything
{this does not affect your code} and then start the process again.
### Compatibility:
Mapping Names:
============
By default, the MDK is configured to use the official mapping names from Mojang for methods and fields
in the Minecraft codebase. These names are covered by a specific license. All modders should be aware of this
license. For the latest license text, refer to the mapping file itself, or the reference copy here:
https://github.com/NeoForged/NeoForm/blob/main/Mojang.md
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.
Additional Resources:
==========
Community Documentation: https://docs.neoforged.net/
NeoForged Discord: https://discord.neoforged.net/