Faster Random
Faster Random is a rewrite of Minecraft's random systems to use the new LXM generators introduced in Java 17, instead of the slower CheckedRandom (and related generators) within Minecraft. Most JVM's should support the generator by default, but check your logs for any warnings!
This also patches the MC-239059 "bug"(which doesn't have much of an effect on the game, but is still a bug.)
Faster Random's generators take more time to construct on most systems (I only have my Linux AMD system to go off of), but are much faster to generate numbers. Since minecraft re-uses many generators (meaning the construction penalty is avoided), the performance gain can vary largely.
Performance can be tested via the testmod, which runs a benchmark against each method when run.
Currently, Faster Random targets the slower random generators, which creates a performance boost with world structure placement/generation, and feature + carver placement and generation, alongside a lot of client-side things like dropped items. Currently Faster Random does not do anything to the faster generators yet. (Until I'm sure it'll improve performance noticably and not cause more harm than good)
Should you use this mod?
It's likely that Faster Random will only improve worldgen performance up to a certain extent, as you'll quickly hit a RAM and I/O bottleneck from the increased amount of chunks stored in RAM/being written to disk. This isn't a bad thing, this just means that you're generating chunks faster than the rest of your system can store them. Depending on your system, your mileage may vary greatly.
As a result, this mod provides the most performance in situations where the server thread(s) are CPU bottlenecked (singleplayer runs on an internal server), but have access to a decent amount of fast memory and storage (DDR4 RAM, and a SATA III or better HDD).
For world generation, Faster Random is almost 1:1, but some cave shapes will generate differently to Vanilla. Everything else is 1:1. It's likely that these differences will be unnoticiable, but shouldn't be used for parity-sensitive things like speedrunning. Optifine's math optimizations do far more damaging changes to worldgen than Faster Random.
Faster Random does not need to be on both the client and server. Faster Random can provide a small performance boost client-side, as quite a few things are still random there.
System Requirements (3.0.0+)
- A JVM that fully supports Java 17's new
RandomGenerator
system, and implementations of the LXM generators alongside it. (example: GraalVM). Having an unsupported JVM will disable Faster Random, and will require you to use Faster Random 1.6.0. If your JVM doesn't support this, chances are it's not a good JVM.
(Note: You may be unknowingly using a headless JDK for Minecraft, which breaks Faster Random due to a variety of strange reasons. Please check if you have downloaded the correct JDK/Package if Faster Random is crashing.)
If you're using the normal Minecraft Launcher, this mod should work fine with the bundled JVM, and you're free to ignore these instructions if no warning shows up in your logs.
Usage with other mods
Faster Random should work well with a large variety of mods, especially after 4.0.0. Faster Random will also actively support most major worldgen mods and Distant Horizons.
Faster Random also can perform better alongside other terrain optimization mods such as Noisium and C2ME, thanks to them making better leverage of Minecraft's random systems with multithreading. Ideally, you should use Noisium + Faster Random, and throw as much ram (10GB+) as you can spare at Minecraft when using Distant Horizons (C2ME has a performance hit with DH). Faster Random can leverage Noisium for a reduction in CPU usage from world generation.
Forge?
Francium is an unofficial forge variant for 1.16 and 1.18, which mostly does what Faster Random does, albeit without the worldgen optimizations. For 1.20.1 and these worldgen changes, Sinytra Connector should be able to run the mod with a "stable enough" experience. For 1.20.1+, you can try using the NeoForge port.
Faster Random's Icon is licensed under CC-BY-SA. Code is licensed under Apache 2.0.
Like this mod? Feel free to support development by contributing code, creating bug reports, and letting others know about it (it helps a lot)!
90% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+