MTR Optimized
A high-performance companion mod for Minecraft Transit Railway (MTR), focused on client-side rendering optimization. Built for Forge 1.20.1.
Features
Rendering Pipeline
- Batch Render Manager — Groups vehicle entities by material bucket (OPAQUE / TRANSLUCENT / EMISSIVE / EFFECT) to reduce draw calls via instanced rendering.
- Frustum Culling System — Cheap-reject distance + direction culling using scalar-only math (zero allocations, zero
sqrt). - LOD System — Distance-based level-of-detail switching for train models.
- Animation Cache Manager — Caches animation pose calculations with
partialTick-free keys and batch eviction.
Lighting
- Light System Optimizer — Low-frequency light snapshot capture (every 16 frames, 1×1 chunk radius) to avoid chunk lock contention.
- Emissive Light Cache — Caches emissive block light values for static trains.
- Shadow Proxy Manager — Merges connected carriage bounding boxes into a single shadow proxy for Iris/Oculus, reducing shadow pass draw calls. Reflection is resolved once and permanently cached.
Tick & Network
- Tick Optimizer — Sleeps physics for stationary trains (configurable threshold). Zero-allocation heartbeat using raw
doublefields instead ofVec3. - Network Throttle Manager — Throttles network data updates for static entities.
VRAM & GPU
- NvidiaVRAMManager — VRAM residency tracking with LRU eviction and watchdog (every 120 frames to avoid GL pipeline flush).
- NvidiaGLExtManager — AZDO / DSA extension support with graceful degradation.
- NvidiaComputeManager — Compute shader offloading for skeletal animation and frustum culling (disabled by default).
Compatibility
- ConflictDetector — Detects Sodium / Rubidium / Embeddium / Iris / Oculus and automatically disables conflicting optimizations. Uses
volatile booleanfast-path caches (zero monitor contention). - MTRTrainRenderInjector — Non-intrusive renderer replacement via reflection (Path A: event-level interception, Path B: render-stage overlay). Falls back gracefully when YMTR / ANTE mixins are present.
- ModSchedulingCoordinator — Coordinates CPU scheduling with Rubidium/Sodium to avoid thread pool conflicts.
Configuration
All options are available in-game via Mods → MTR Optimized → Config.
| Option | Default | Description |
|---|---|---|
enableTickSleeping |
true |
Sleep physics for stationary trains |
enableAnimationCache |
true |
Cache animation calculations |
enableVanillaMultiThreadBlock |
false |
Multi-threaded block geometry build (statistics-only, no render replacement yet) |
enableNvidiaOptimization |
false |
NVIDIA-specific VRAM/GL ext/compute features |
stationaryThresholdTicks |
200 |
Ticks of immobility before a train enters sleep |
showDebugInfo |
false |
Debug overlay with FPS / entity count / cache stats |
Requirements
- Minecraft 1.20.1
- Forge 47.0.19+
- MTR (Minecraft Transit Railway) — required, any 1.20.1 build
Authors
Accac, Bugjump Studios • MTRO Contributors
MTR Optimized
A high-performance companion mod for Minecraft Transit Railway (MTR), focused on client-side rendering optimization. Built for Forge 1.20.1.
Features
Rendering Pipeline
- Batch Render Manager — Groups vehicle entities by material bucket (OPAQUE / TRANSLUCENT / EMISSIVE / EFFECT) to reduce draw calls via instanced rendering.
- Frustum Culling System — Cheap-reject distance + direction culling using scalar-only math (zero allocations, zero
sqrt). - LOD System — Distance-based level-of-detail switching for train models.
- Animation Cache Manager — Caches animation pose calculations with
partialTick-free keys and batch eviction.
Lighting
- Light System Optimizer — Low-frequency light snapshot capture (every 16 frames, 1×1 chunk radius) to avoid chunk lock contention.
- Emissive Light Cache — Caches emissive block light values for static trains.
- Shadow Proxy Manager — Merges connected carriage bounding boxes into a single shadow proxy for Iris/Oculus, reducing shadow pass draw calls. Reflection is resolved once and permanently cached.
Tick & Network
- Tick Optimizer — Sleeps physics for stationary trains (configurable threshold). Zero-allocation heartbeat using raw
doublefields instead ofVec3. - Network Throttle Manager — Throttles network data updates for static entities.
VRAM & GPU
- NvidiaVRAMManager — VRAM residency tracking with LRU eviction and watchdog (every 120 frames to avoid GL pipeline flush).
- NvidiaGLExtManager — AZDO / DSA extension support with graceful degradation.
- NvidiaComputeManager — Compute shader offloading for skeletal animation and frustum culling (disabled by default).
Compatibility
- ConflictDetector — Detects Sodium / Rubidium / Embeddium / Iris / Oculus and automatically disables conflicting optimizations. Uses
volatile booleanfast-path caches (zero monitor contention). - MTRTrainRenderInjector — Non-intrusive renderer replacement via reflection (Path A: event-level interception, Path B: render-stage overlay). Falls back gracefully when YMTR / ANTE mixins are present.
- ModSchedulingCoordinator — Coordinates CPU scheduling with Rubidium/Sodium to avoid thread pool conflicts.
Configuration
All options are available in-game via Mods → MTR Optimized → Config.
| Option | Default | Description |
|---|---|---|
enableTickSleeping |
true |
Sleep physics for stationary trains |
enableAnimationCache |
true |
Cache animation calculations |
enableVanillaMultiThreadBlock |
false |
Multi-threaded block geometry build (statistics-only, no render replacement yet) |
enableNvidiaOptimization |
false |
NVIDIA-specific VRAM/GL ext/compute features |
stationaryThresholdTicks |
200 |
Ticks of immobility before a train enters sleep |
showDebugInfo |
false |
Debug overlay with FPS / entity count / cache stats |
Requirements
- Minecraft 1.20.1
- Forge 47.0.19+
- MTR (Minecraft Transit Railway) — required, any 1.20.1 build
Authors
Accac, Bugjump Studios • MTRO Contributors
MTR Optimized
一款面向 Minecraft Transit Railway (MTR) 的高性能附属模组,专注于客户端渲染优化。基于 Forge 1.20.1 开发。
功能
渲染管线
- 批量渲染管理器 — 按照材质分组(不透明 / 半透明 / 自发光 / 特效)对载具实体归类,通过实例化渲染降低绘制调用。
- 视锥剔除系统 — 采用纯标量数学实现快速距离+朝向剔除(无对象分配、无
sqrt平方根运算)。 - LOD细节层级系统 — 根据距离切换列车模型细节等级。
- 动画缓存管理器 — 使用不带
partialTick插值刻的键值缓存动画姿态计算,并支持批量缓存淘汰。
光照
- 光照系统优化器 — 低频采集光照快照(每16帧,仅1×1区块范围),规避区块锁竞争。
- 自发光光源缓存 — 缓存静态列车的自发光方块光照数值。
- 阴影代理管理器 — 将相连车厢包围盒合并为单个阴影代理以适配 Iris/Oculus,减少阴影通道绘制调用。反射仅解析一次并永久缓存。
游戏刻与网络
- 游戏刻优化器 — 静止列车达到可配置阈值后休眠物理运算。使用原生
double双精度字段实现零分配状态心跳,替代Vec3向量对象。 - 网络节流管理器 — 对静止实体限制网络数据更新频率。
显存与GPU
- 英伟达显存管理器 — LRU缓存淘汰机制追踪显存驻留状态,配备看门狗(每120帧执行,避免OpenGL管线强制刷新)。
- 英伟达GL扩展管理器 — 支持AZDO / DSA扩展,不兼容显卡时优雅降级。
- 英伟达计算管理器 — 使用计算着色器分担骨骼动画与视锥剔除运算(默认关闭)。
兼容性
- 冲突检测器 — 检测 Sodium / Rubidium / Embeddium / Iris / Oculus,自动关闭相冲突的优化。采用
volatile boolean快速路径缓存,消除监视器锁竞争。 - MTR列车渲染注入器 — 通过反射实现无侵入渲染器替换(A路径:事件层拦截;B路径:渲染阶段叠加)。检测到 YMTR / ANTE 混入(Mixin)时自动降级回退。
- 模组调度协调器 — 与 Rubidium/Sodium 协同调度CPU任务,避免线程池冲突。
配置
全部选项可在游戏内通过 模组 → MTR Optimized → 配置 进行调整。
| 配置项 | 默认值 | 说明 |
|---|---|---|
enableTickSleeping |
true |
静止列车休眠物理运算 |
enableAnimationCache |
true |
开启动画计算缓存 |
enableVanillaMultiThreadBlock |
false |
方块几何体多线程构建(仅统计数据,暂未实现渲染替换) |
enableNvidiaOptimization |
false |
英伟达专属显存/GL扩展/计算着色器功能 |
stationaryThresholdTicks |
200 |
列车静止多少游戏刻后进入休眠 |
showDebugInfo |
false |
调试悬浮面板,显示FPS/实体数量/缓存统计 |
依赖要求
- Minecraft 1.20.1
- Forge 47.0.19 及以上版本
- MTR (Minecraft Transit Railway) — 必需,任意1.20.1版本构建
作者
Accac,Bugjump Studios • MTRO Countributors

