promotional bannermobile promotional banner

Railpolish

Attempt to optimize the sync of trains to the server to address visual jitter.

File Details

railpolish-1.0.3.jar

  • R
  • Mar 7, 2026
  • 17.95 KB
  • 14
  • 1.20.1
  • Forge

File Name

railpolish-1.0.3.jar

Supported Versions

  • 1.20.1

Curse Maven Snippet

Forge

implementation fg.deobf("curse.maven:railpolish-1477562:7722702")
Curse Maven does not yet support mods that have disabled 3rd party sharing

Learn more about Curse Maven

RailPolish Fix Summary

ID Fix / Optimization What it does Effect / Improvement
Fix 1 Interpolation decay prevention Prevents bad ticksSince values from degrading carriage smoothing over time Stability fix for long play sessions; reduces desync-style visual drift
Fix 2 TPS-speed modifier clamp Clamps smoothing speed modifier so low TPS does not cause overreaction or unstable snapping Smoother train motion under lag; prevents harsh correction behavior
Fix 3 Bogey pathfinding range increase Increases Create bogey BFS/path lookup range from 32 to 96 blocks 3x larger search range; reduces path loss and train state errors on longer/complex track sections
Fix 4 Passenger sync boost Forces more frequent train/carriage sync when passengers are present Better rider smoothness; reduces visible jitter while mounted
Fix 5 Immediate sync on mount Sends immediate carriage sync when a player mounts a contraption/train Removes the “wait a few ticks before it becomes smooth” problem
Fix 6 4-tier LOD sync scheduler Uses staggered sync frequency by relevance instead of over-syncing everything Large CPU/FPS savings versus every-tick sync; especially important on integrated server/client systems
Fix 7 BFS same-edge short-circuit Skips unnecessary expensive path work when source and destination are on the same edge Reduces pathfinding overhead in common short-distance cases; near O(1) shortcut
Fix 8 Directional snapshot caps Limits how far snapshot correction can push motion backward/forward Backward cap 2 blocks, forward cap 48 blocks; reduces accordioning and rubberband feel
Fix 10 Contraption reload fall-through prevention Prevents bad state transitions during contraption reload/reassembly cases Improves stability and reduces weird reload motion bugs
Fix 11 VS2 ship bed sleep fix Fixes sleeping on Valkyrien Skies ships using world-space distance logic Prevents broken bed checks on moving ships/contraptions
Fix 12 SoundEngine CME prevention Uses safer concurrent handling to stop sound-engine concurrent modification crashes Crash prevention; improves client stability
Fix 13 Train disassembly alignment fix Fixes negative-distance and angle tolerance issues during train disassembly/alignment Uses 0.5° pitch/yaw tolerance; fewer alignment failures and less bad placement
Fix 18 Null-graph BFS guard Prevents train smoothing/path code from failing during temporary graph rebuild states Crash/stability fix during track graph rebuilds
Fix 20 SSP smoothing + asymmetric blending Improves client-side train smoothing with better deceleration blending and early-exit logic Major visual smoothness improvement; less jitter, less overcorrection, less wasted math

Performance Optimizations

ID Optimization What it does Effect / Improvement
Opt 1 Throttle markTracksDirty() Instead of marking Create railway data dirty every tick per train, marks every 100 ticks unless speed changed About 99% fewer dirty-mark calls in steady-state train operation
Opt 2 Skip stationary collision scans Prevents parked trains from running collideWithOtherTrains() logic 100% of collision cost removed for stationary trains
Opt 3 Throttle observer inventory scans tickOccupiedObservers() now runs every 4 ticks instead of every tick About 75% fewer observer inventory scans
Opt 4 Throttle edge-group resolution resolveIntersectingEdgeGroups() runs every 4 ticks instead of every tick About 75% fewer intersection/group resolution runs
Opt 5 Throttle navigation signal BFS Signal scout BFS runs every 8 ticks when far from a signal/destination About 87.5% fewer BFS scans while cruising on open track

Current Smoothing Parameters

Setting Value Purpose
SSP smoothing floor 0.90 Keeps smoothing responsive under lag
SSP smoothing rate 15% per tick Prevents overreaction and harsh snapping
Deceleration blend 0.5 Smooths slowing down without making acceleration feel delayed
Backward snap cap 2 blocks Prevents backward rubberbanding
Forward snap cap 48 blocks Allows catch-up without harsh oscillation
Tier 1 sync rate Every 3 ticks staggered Preserves FPS vs every-tick syncing

Category Result
Train smoothness Better interpolation, less jitter, less rubberbanding
Passenger experience Faster mounted sync, smoother riding
Server performance Fewer dirty saves, fewer BFS scans, fewer idle collision checks
Idle train cost Parked trains are much cheaper
Track graph safety Better handling during graph rebuilds
VS2 compatibility Improved bed/sleep behavior on ships
Client stability Prevents SoundEngine concurrent modification crashes