RailOptimization

RailOptimization

A simple mod that makes powered/activator rails turn on/off up to 10x faster.

506 860 downloads
122 followers

Description

RailOptimization is a lightweight mod that makes powered rails and activator rails turn on and off up to 10x faster in complex rail networks.

The best result is that you notice nothing while it is operating, except smoother and faster rail updates. The mod optimizes rail redstone updates. Vanilla behavior and the default power range are preserved unless you explicitly change the range.

Features

  • Faster powered rail and activator rail activation and deactivation.
  • Optimized updates across straight, ascending, descending, and mixed rail networks.
  • Reduced work for repeated neighbor updates that do not change rail state.
  • Optional powered/activator rail range from 1 to 64; the vanilla default remains 8.
  • Runtime switch between optimized and vanilla update logic for compatibility checks.
  • Native implementation for both fabric and neoforge with no Architectury API dependency.

Performance

Current release-build benchmarks measured state-changing updates at 7.71x faster on straight rail lines and 10.26x faster on mixed slopes than vanilla. A repeated unchanged-update scenario measured up to 32.36x faster.

Results vary with hardware, server load, rail layout, power range, and other installed mods. These figures describe the included benchmark scenarios and are not a guarantee for every world.

Commands

  • /railoptimization shows the current optimization state and power limit.
  • /railoptimization on and /railoptimization off require administrator permission.
  • /railoptimization powerLimit <value> requires administrator permission and accepts values from 1 to 64.

Compatibility Notes

  • RailOptimization v1.2 and earlier are incompatible with Carpet TIS Addition. RailOptimization v1.3 and later are compatible.
  • If a contraption or another mod behaves differently from vanilla, use /railoptimization off for an immediate comparison and include a minimal reproduction when reporting the problem.

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.

More Information

For source code, issue reports, or any other questions, please visit the RailOptimization GitHub repository.