Francium

Francium

Replace traditional Random with ThreadLocalRandom in minecraft codes for better performance and higher fps.

by
41.6K Downloads
forgeoptimization
Rent Server with this Mod

About this Mod

Francium

Francium is a Forge optimization mod that replaces some Random fields with ThreadLocalRandom for better performance and higher fps.

This is inspired by Faster Random
(But Francium doesn't change world generation or other stuff that makes huge difference from vanilla.
The only difference so far is the speed of squid tentacle movement speed initialization lol).
However, Francium's implementation is wider and more rooted.

ThreadLocalRandom has a property: its setSeed method is not a supported operation, Thus, as long as a Random field is not calling setSeed, Francium can replace it with ThreadLocalRandom.

Client side: Optional

Server side: Optional

Benchmark Info

The below benchmark is outdated due to the security improvement in 1.0.0.
Details: In Francium 1.0.0, To completely avoid the UnsupportedOperationException crash (and this is the only crash Francium may cause) of `ThreadLocalRandom#setSeed`, I did some security improvement so that if a Random field is setSeed, next it will no longer call ThreadLocalRandom. 
For players, this security brings down performance improvement for a little bit, in my test my fps improvement dropped to 100 from 150.

Minecraft version: 1.16.5

Java version: Azul Zulu Java 17 (highly recommended, check out ModernFix's wiki!)

Weather: None

Difficulty: Peaceful

Seed: -963323667424106092

Position: -139.746 102.0 -658.997

ModList:
img.png

Entities and item entities have been cleared by Cuneiform commands /killall and /killitems

You can see my play time is 4:29 below, and in these 269 seconds, I have never moved or change my mouse too much (almost completely still).

This has been tested for three times, and the images below are from the third test.

With Francium Installed

Average FPS: 780 ~ 800
img.png

Without Francium Installed

Average FPS: 630 ~ 650
img.png

1.19.2 ~ 1.20.1?

Not currently.

In 1.19.2+, Mojang overhauled random number generation from Java's own Random to a custom RandomSource class.

So if Francium is to support higher versions, it may only be able to undergo simple replacements (Also, the new effects from this replacement is not at all guaranteed to be consistent with vanilla, which is what Francium didn't want.) in specific classes much like Faster Random, and may not be conducive to fundamental reforms like it be in 1.16.5 and 1.18.2, optimization will also be much less effective.

Misc

Join Our discord: https://discord.gg/g8q3UHTpCP!

Available Versions

Francium 1.16.5-1.0.1release
MC 1.16.5forge
December 19, 2023
Francium 1.18.2-1.0.1release
MC 1.18.2forge
December 19, 2023
Francium 1.18.2-1.0.0release
MC 1.18.2forge
December 18, 2023
Francium 1.16.5-1.0.0release
MC 1.16.5forge
December 18, 2023
Francium 1.18.2-0.0.2release
MC 1.18.2forge
December 18, 2023

How to Install Francium on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set forge Loader

In the panel under "Egg", select the forge loader and matching Minecraft version (1.18.2).

3

Install Mod

Open the mod browser in the dashboard and search for "Francium". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

forge

Minecraft Versions

1.18.2, 1.16.5

Server-side

~ Optional

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

Francium server crashes on startup – what to do?

Most common cause: wrong forge version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.18.2). You can switch loaders with one click in the panel.

Is Francium compatible with forge?

Francium officially supports forge for Minecraft 1.18.2, 1.16.5. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with Francium – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Francium consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install Francium with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
GNU Lesser General Public License v3.0 or later
Server-side
Optional

Supported Versions

1.18.21.16.5