描述
RailOptimization 是一个轻量级模组,可使动力铁轨和激活铁轨在复杂铁路网络中开启和关闭的速度最高提升 20 倍。
最佳效果是你在运行时几乎察觉不到变化,仅感受到更流畅、更快的铁轨状态更新。除非你明确更改了范围,否则原版行为和默认电力范围将保持不变。
性能表现
| 基准测试场景(使用 v2.0) |
Fabric (最高) |
NeoForge (最高) |
| 直线铁轨状态变更 |
9.38x |
16.69x |
| 混合坡度状态变更 |
12.09x |
22.93x |
| 重复未变状态更新(间接供电) |
48.69x |
38.30x |
快照版本:
| 基准测试场景(使用 v2.5-snapshot.2) |
Fabric (最高) |
NeoForge (最高) |
| 直线铁轨状态变更 |
16.06x |
28.40x |
| 混合坡度状态变更 |
21.44x |
38.28x |
| 重复未变状态更新(间接供电) |
52.27x |
40.15x |
测量条件为本地多轮基准测试,默认电力范围为 8,更新长度为 17,在同一加载器下对比优化与未优化的铁轨更新。实际增益因铁路布局、服务器负载、硬件、电力范围及其他已安装模组而异。
状态变更结果包含开启和关闭铁轨的过程。未变状态结果衡量的是无电力状态变化的重复更新;它并非开关速度提升或全服务器加速。
功能特性
- 支持直线、上坡、下坡及混合坡度铁路网络的快速更新。
- 大幅降低导致铁轨状态不变的重复更新开销。
- 可选电力范围从 1 到 64,保留原版默认的 8。
- 无需重启即可在原版和优化更新逻辑之间切换。
- 原生构建支持 Fabric、Forge 和 NeoForge,无 Architectury API 依赖。
以默认设置安装后即可直接使用,无需额外配置。
命令
| 命令 |
用途 |
/railoptimization |
显示当前状态和电力上限 |
/railoptimization on |
启用优化更新路径 |
/railoptimization off |
使用原版更新逻辑 |
/railoptimization powerLimit <value> |
设置铁轨电力范围(1 至 64) |
/railoptimization reload |
重新加载配置文件 |
更改设置需要管理员权限。设置会自动保存至 railoptimization.json,并在重启后持久化。
兼容性
- 请选择对应 Minecraft 版本和模组加载器的文件。
- RailOptimization v1.2 及更早版本与 Carpet TIS Addition 不兼容。v1.3 及更高版本已兼容。
- 若要与原版的机械装置行为进行对比,请使用
/railoptimization off 并再次触发该装置。如果发现行为差异,请提交包含最小复现步骤的报告。
致谢
RailOptimization 最初源于 FxMorin 的 RailOptimization 的一个分支。衷心感谢 FxMorin 及原始贡献者的辛勤工作。尽管当前实现已被广泛重写,但若无他们的原始工作,本项目将无法存在。
特别感谢 JellySquid、2No2Name 及其他 Lithium 贡献者。RailOptimization 针对铁轨的批量写入设计是通过研究并借鉴其源代码以及现有的调色板和区块存储优化方案而开发的。当安装 Lithium 时,RailOptimization 会使用其优化的调色板和位存储实现,并与之集成区块变更追踪。Lithium 仍为可选依赖。
更多信息
如需获取源代码、问题报告或其他疑问,请访问 RailOptimization GitHub 仓库。
Description
RailOptimization is a lightweight mod that makes powered rails and activator rails turn on and off up to 20x faster in complex rail networks.
The best result is that you notice nothing while it is operating, except smoother and faster rail updates. Vanilla behavior and the default power range are preserved unless you explicitly change the range.
Performance
| Benchmark scenario (use v2.0) |
Fabric (up to) |
NeoForge (up to) |
| Straight rail state changes |
9.38x |
16.69x |
| Mixed-slope state changes |
12.09x |
22.93x |
| Repeated unchanged-state updates (indirect power) |
48.69x |
38.30x |
Snapshot:
| Benchmark scenario (use v2.5-snapshot.2) |
Fabric (up to) |
NeoForge (up to) |
| Straight rail state changes |
16.06x |
28.40x |
| Mixed-slope state changes |
21.44x |
38.28x |
| Repeated unchanged-state updates (indirect power) |
52.27x |
40.15x |
Measured in local multi-round benchmarks at the default power range of 8 with updating length 17, comparing optimized and unoptimized rail updates on the same mod loader. Actual gains vary with rail layout, server load, hardware, power range, and other installed mods.
State-change results include both turning rails on and turning them off. The unchanged-state result measures repeated updates without a power-state change; it is not an on/off speedup or a whole-server speedup.
Features
- Fast updates across straight, ascending, descending, and mixed-slope rail networks.
- Greatly reduced cost for repeated updates that leave rail state unchanged.
- Optional power range from 1 to 64, with vanilla's default of 8 unchanged.
- Switch between vanilla and optimized update logic without restarting.
- Native builds for Fabric, Forge, and NeoForge, with no Architectury API dependency.
Install it with the default settings and it works without additional configuration.
Commands
| Command |
Purpose |
/railoptimization |
Show the current state and power limit |
/railoptimization on |
Enable the optimized update path |
/railoptimization off |
Use vanilla update logic |
/railoptimization powerLimit <value> |
Set the rail power range from 1 to 64 |
/railoptimization reload |
Reload the configuration file |
Changing settings requires administrator permission. Settings are saved automatically in railoptimization.json and persist across restarts.
Compatibility
- Choose the file for your Minecraft version and mod loader.
- RailOptimization v1.2 and earlier are incompatible with Carpet TIS Addition. RailOptimization v1.3 and later are compatible.
- To compare a contraption with vanilla, use
/railoptimization off and trigger it again. If you find a behavioral difference, please report it with a minimal reproduction.
Acknowledgements
RailOptimization began as a fork of FxMorin's RailOptimization. My sincere thanks go to FxMorin and the original contributors for their work. The current implementation has since been extensively rewritten, but this project would not exist without their original work.
Special thanks also go to JellySquid, 2No2Name, and the other Lithium contributors. RailOptimization's rail-specific batch-write design was developed by studying and drawing on their source code and existing palette and chunk-storage optimizations. When Lithium is installed, RailOptimization uses its optimized palette and bit-storage implementations and integrates with its block-change tracking. Lithium remains optional.
More Information
For source code, issue reports, or any other questions, please visit the RailOptimization GitHub repository.
评论 0
登录后参与评分
还没有评论,来抢沙发吧