Francium
Francium 是一个 Forge 优化模组,通过将部分 Random 字段替换为 ThreadLocalRandom 来提升性能并提高帧率。
本项目的灵感来源于 Faster Random(但 Francium 不会改变世界生成或其他会导致与原版产生巨大差异的内容。目前唯一的区别是鱿鱼触手移动速度初始化的速度,哈哈)。然而,Francium 的实现方式更广泛且更深入。
ThreadLocalRandom 有一个特性:它的 setSeed 方法不是受支持的操作。因此,只要 Random 字段没有调用 setSeed,Francium 就可以将其替换为 ThreadLocalRandom。
客户端:可选
服务端:可选
基准测试信息
以下基准测试已过时,因为 1.0.0 版本进行了安全改进。
详情:在 Francium 1.0.0 中,为了完全避免 `ThreadLocalRandom#setSeed` 导致的 UnsupportedOperationException 崩溃(这也是 Francium 可能导致的唯一崩溃),我进行了一些安全改进,使得如果 Random 字段调用了 setSeed,下次将不再调用 ThreadLocalRandom。
对于玩家来说,这一安全措施会略微降低性能提升效果。在我的测试中,我的帧率提升从 150 FPS 降到了 100 FPS。
Minecraft 版本:1.16.5
Java 版本:Azul Zulu Java 17(强烈推荐,请查看 ModernFix 的 wiki!)
天气:无
难度:和平
种子:-963323667424106092
位置:-139.746 102.0 -658.997
模组列表:

实体和物品实体已通过 Cuneiform 的 /killall 和 /killitems 命令清除。
你可以在下方看到我的游戏时长为 4:29,在这 269 秒内,我几乎没有移动过鼠标(几乎完全静止)。
此测试已重复三次,下方的图片来自第三次测试。
安装 Francium 后
平均帧率:780 ~ 800

未安装 Francium
平均帧率:630 ~ 650

1.19.2 ~ 1.20.1?
目前不支持。
在 1.19.2+ 版本中,Mojang 将随机数生成从 Java 自带的 Random 类重构为自定义的 RandomSource 类。
因此,如果 Francium 要支持更高版本,可能只能像 Faster Random 那样在特定类中进行简单的替换(此外,这种替换带来的新效果完全无法保证与原版一致,而这正是 Francium 所不希望看到的)。同时,它可能无法像 1.16.5 和 1.18.2 那样进行根本性的改革,优化效果也会大打折扣。
其他
加入我们的 Discord:!
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:

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

Without Francium Installed
Average FPS: 630 ~ 650

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:
下载 Francium
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Francium
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Francium
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Francium
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Francium
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Francium
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Francium
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Francium
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
修复 NPE
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
缓冲的原始输入和线程化的事件轮询
模组
原版世界生成优化模组
模组
? 使用命令保存和加载玩家或他人的背包/套装。
模组
一堆修复
模组
一个基于构建器的 Minecraft 配置库!
模组
快速落叶:砍树后树叶迅速消失。专为高性能与模组兼容打造!
评论 0
登录后参与评分
还没有评论,来抢沙发吧