CoreLib
by SCsupercraft
CoreLib is a library mod that gives other mods codecs, saved data and synced data without each one writing its own.
What it does
CoreLib provides a set of codec classes. It builds codecs for classes that take type parameters as well as plain classes, and it can build a codec for a record by reading the record's components. Codecs can also be created dynamically for enums and for classes that are almost records.
Its SaveData class handles writing data to disk and reading it back. Classes that extend SaveData are saved and loaded automatically. Data can be attached either to a modpack instance or to a world save, depending on which kind is needed.
The SyncedData class keeps data synchronized between the server and clients through a utility class. SaveData classes can implement an interface so that their contents are synced to clients automatically. Architectury API and Fabric API are required dependencies, so both must be installed alongside CoreLib on Fabric. The mod is published for Fabric and NeoForge for 1.21.8 only, and it runs on client and server. Its code is released under CC0 1.0 Universal and is open source, with no restrictions on use.
Key features
Codec resolution
Codecs are resolved on their own for many classes, including classes that carry type parameters.
Record and enum codecs
Codecs for records are built from their components, and codecs for enums and near-records are created dynamically.
Automatic save and load
Classes extending SaveData are written to disk and read back without manual file handling.
Synced data to clients
SyncedData keeps chosen data in step between the server and clients through a utility class.
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 2
Use cases
Who it’s for: Mod developers writing Fabric or NeoForge mods for 1.21.8 that need codecs, persistent data or client synchronization. Server owners need it only when a mod built on it is installed.
Questions
Does CoreLib need Architectury API and Fabric API?
Which loaders does CoreLib support?
Does CoreLib have to be installed on both sides?
In the catalog
CoreLib is one of 3,514 Library mods on ModsFinder, and one of 2,348 Library mods for Fabric. 17,695 mods support Minecraft 1.21.8.
More from SCsupercraft
Similar mods
What the author says
CoreLib is a library mod for data handling. CoreLib can automatically resolve codecs for given classes, including generic classes with type parameters.\ It can also dynamically create new codecs for any enum, as well almost any record.
Official listing
- Modrinth page
- modrinth.com/mod/core-lib
- Owner
- SCsupercraft
- Published
- 2025-09-26
- Updated on Modrinth
- 2025-10-01
- Facts verified
- 2026-10-15
