Create Train Crash Fix
by JXSnack
Create Train Crash Fix repairs a server crash caused by trains from the Create mod that end up at invalid, endless positions.
What it does
The author traced the crash to the train data file that Create writes to disk. Trains with invalid positions were serialised into that file, and loading them later brought the server down. The fix works by adding two mixin injections, which correct the position data during the read step, so the affected trains load safely.
Careful checking showed that the NBT values written for the tracks were already NaN before the file was saved, which points to a problem in how positions were serialised. The author noted that the tracks data file itself contained nothing unusual, and the fix was placed at the readNbt call inside Create's train entity code instead. A later proposal in the Create project followed a similar approach, and the final version of this mod is the one that was added.
The mod requires Create Fabric and runs only on the server. Players joining a server that uses it do not need to install anything. Files are published for Fabric and Quilt for Minecraft 1.20.1, and the code is open source under the GNU Affero General Public License v3.0 only.
Key features
Stops invalid train positions from crashing
Trains whose positions have become invalid no longer bring the server down when the world loads.
Fix applied at the NBT read step
Two mixin injections correct the position values during reading, leaving the rest of Create untouched.
Targets the train entity
The change sits in the readNbt method of Create's train entity, the point where the bad values were found.
Public source and issue tracker
The source code and issue tracker are public, so problems and changes can be followed by the community.
Compatibility
Latest build for each game version and loader.
Only full game releases are shown. This mod publishes no snapshot builds.
Requirements
Dependencies declared by the latest file for each loader.
Required 1
Use cases
Who it’s for: Server owners running Create trains on a Fabric or Quilt server for Minecraft 1.20.1 who have experienced crashes linked to train positions.
Questions
Does Create Train Crash Fix need Create Fabric?
Do players need to install Create Train Crash Fix?
Which loaders and versions does the mod support?
Where can the source code be found?
In the catalog
Create Train Crash Fix is one of 8,499 Technology mods on ModsFinder, and one of 4,201 Technology mods for Fabric. 34,764 mods support Minecraft 1.20.1.
More from JXSnack
Similar mods
What the author says
First we've got to take a look at the issue: the train does not have an invalid position in the train data file. That means it has to be somewhere in the serialisation. I added two mixin injections. One at createEntity (from create) and readNbt (from minecraft).
Official listing
- Modrinth page
- modrinth.com/mod/create-train-fix
- Owner
- JXSnack
- Published
- 2024-10-24
- Updated on Modrinth
- 2024-10-24
- Facts verified
- 2026-10-15