From e5e8d3340130a73caea28b0ff47c3830ce25e8f4 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Mon, 10 Mar 2025 20:29:38 +0700 Subject: [PATCH] Provide README --- README.md | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index b421122..cf543e0 100644 --- a/README.md +++ b/README.md @@ -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/