SafLib
by Safro
SafLib is a small utility library for Fabric, written by Safro, that other mods draw on for shared code.
What it does
Rather than adding blocks or items to play with, SafLib supplies code that other mods reuse. Its base classes cover a range of common tasks, its math utilities provide helper functions, and its registry helper simplifies registering content. Safro describes it as a simple library intended for use inside the author's own mods, so its scope stays narrow.
SafLib runs on client and server, and the server and every player need it. Its files cover Minecraft 1.19.4, 1.20, 1.20.1 and 1.21, and the latest Fabric build, 1.1.1, targets 1.21 and was published on 2024-07-04. Fabric API is required and must be installed alongside it. The code is open source under the MIT License and is available as a public source repository.
Key features
Math utilities
Helper functions for common calculations, so mods built on the library do not each need their own.
Registry helper
A registry helper that simplifies registering blocks, items and other game content in a mod.
Server-to-client particle spawning
Particles can be spawned on the server and sent to clients, which keeps visual effects in step with game events.
Base classes
Shared base classes for common tasks, giving dependent mods a starting structure to extend.
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
Building a mod on a shared base
A developer who writes several mods can depend on SafLib for the same registry and math code in each.
Sending effects from the server
A mod that triggers particles on the server can use the library's spawning to show them on every client.
Who it’s for: Mod developers who want shared helper code for Fabric projects, especially those working on the author's own mod set.
Questions
Does SafLib need Fabric API?
Does SafLib have to be installed on both sides?
Which game versions does SafLib support?
More from Safro
What the author says
SafLib is a small and simple library mod intended for usage within my mods. If you're interested in using the library, use the modrinth maven to access versions and simply include it into your project
Official listing
- Modrinth page
- modrinth.com/mod/saflib
- Owner
- Safro
- Published
- 2023-06-04
- Updated on Modrinth
- 2024-07-04
- Facts verified
- 2026-10-15
