# Modern Railroading
**Life-sized railway simulation for NeoForge 1.21.1.**
Modern Railroading brings real-scale railways to Minecraft. Track isn't placed block by block. You lay it as smooth spline curves, connect it with real switches and double slips, and drive trains through a fixed-step physics simulation, right from the cab.
---
## ✨ Features
### 🛤️ Spline-based track
- Lay track with the in-game **track editor** (`/mr trackedit`). It shows a live preview, and when a piece can't be built it turns red and tells you why
- Smooth curves with a **minimum curve radius per design speed** and grades of up to 100 ‰
- Ballast beds in gravel, dirt and grass
- Track styles are data-driven and can come from content packs
### 🔀 Switches & double slips
- Build **branches**, **crossovers** and connections into open track ends with *Create Switch*
- **Double slips (DKW)** with four selectable routes
- Moving switch blades that throw over a few seconds, with sound
- Set switches in the editor (set leg in green, other leg in red) or with `/mr switch <pos> [straight|diverging|toggle]` and `/mr dkw`. Both commands work from command blocks
### 🚂 Trains & physics
- Add rolling stock with `/mr vehicle add`. Vehicles **couple automatically** when they meet
- Get into a locomotive with `/mr vehicle ride` and drive it with **throttle, brake and reverser keys**, plus whistle, lights and uncoupling
- Physics runs at a fixed **20 Hz** step and is smoothly interpolated on the client
- Trains follow switch settings, and a train that runs a switch the wrong way stops
### 🚉 Station platforms
- Build platforms along the track with the platform editor (`/mr bahnsteig`)
- Platform edges automatically keep the right clearance from the track
### 📦 Content packs & Immersive Railroading compatibility
- Rolling stock and track styles are fully **data-driven** (JSON)
- **Imports existing Immersive Railroading content packs**: rolling stock, OBJ models and track styles
- Load external packs through `config/modernrailroading-common.toml`, with priorities, dependencies, conflicts and overrides
### 🖥️ Railway API for interlockings
- Optional local **HTTP/JSON API** (port 8766, token-protected)
- Read the track network (also as an SVG drawing) and the live train positions, and set switches and double slips from outside the game, for example from a web-based electronic interlocking
---
## 📥 Installation
| Where | File |
|---|---|
| **Server & singleplayer** | `modernrailroading-<version>-server.jar` |
| **Players on a server** | `modernrailroading-<version>-client.jar` (lighter, without server-only code) |
> ⚠️ The client jar alone can't run a singleplayer world. For singleplayer, use the server jar.
**Requires:** Minecraft 1.21.1 · NeoForge 21.1+
---
## 🎮 Default controls (while driving)
Throttle up/down · Brake on/off · Reverser forward/backward · Whistle · Lights · Uncouple behind the locomotive
*(all rebindable under Controls → Modern Railroading)*
---
## 🚧 Development status
Modern Railroading is in active development. Track, the editor, switches, double slips, platforms and driving trains are playable. Expect more features and changes, and please report bugs!

