ModsFinder

MagicLib

by hendrix-shen

Developers who need dependency checks beyond what Fabric Loader offers can use MagicLib, a library that tests dependency expressions and custom predicates.

FabricForgeNeoForgeQuiltClient and serverGNU Lesser General Public License v3.0 onlyOpen source1.14.4 – 26.3

What it does

MagicLib provides a dependency checking system. A dependency can be verified with an expression or a custom predicate, and the check decides whether a feature loads. The library is built for mod developers, so it is used inside other mods rather than played directly.

The checks apply in three places: a Mixin plugin that adds dependency checks Fabric Loader lacks, Mixin application that only goes ahead when conditions hold, and configuration management that shows an option only when its conditions are met. Every player and the server need a copy of the mod. Builds exist for Fabric, Forge, NeoForge and Quilt across 34 release versions, 1.14.4 – 26.3, and the code is open source under the GNU Lesser General Public License v3.0 only.

Key features

  1. Expression-based dependency checks

    Dependencies can be tested with expressions, so a feature depends on the presence and version of other mods.

  2. Custom predicates

    Developers can write their own predicate functions when an expression cannot describe a condition.

  3. Conditional Mixins

    A Mixin is applied only when its dependency conditions are satisfied, which keeps patches inactive when a required mod is absent.

  4. Conditional configuration options

    A configuration item is displayed only when its conditions are met, so players see options that apply to their setup.

  5. Ported MaLiLib features

    Some features from a newer MaLiLib build are carried back, so the same code works on older Minecraft versions.

Compatibility

Latest build for each game version and loader.

26.x5 of 5 versions with builds
26.3v0.8.882-mc26.3-fabricNot availablev0.8.882-mc26.3-neoforgev0.8.882-mc26.3-fabric
26.2v0.8.882-mc26.2-fabricNot availablev0.8.882-mc26.2-neoforgev0.8.882-mc26.2-fabric
26.1.2v0.8.882-mc26.1.2-fabricNot availablev0.8.882-mc26.1.2-neoforgev0.8.882-mc26.1.2-fabric
26.1.1v0.8.882-mc26.1.2-fabricNot availablev0.8.882-mc26.1.2-neoforgev0.8.882-mc26.1.2-fabric
26.1v0.8.882-mc26.1.2-fabricNot availablev0.8.882-mc26.1.2-neoforgev0.8.882-mc26.1.2-fabric
1.21.x12 of 12 versions with builds
1.21.11v0.8.882-mc1.21.11-fabricNot availablev0.8.882-mc1.21.11-neoforgev0.8.882-mc1.21.11-fabric
1.21.10v0.8.882-mc1.21.10-fabricNot availablev0.8.882-mc1.21.10-neoforgev0.8.882-mc1.21.10-fabric
1.21.9v0.8.882-mc1.21.10-fabricNot availablev0.8.882-mc1.21.10-neoforgev0.8.882-mc1.21.10-fabric
1.21.8v0.8.882-mc1.21.8-fabricNot availablev0.8.882-mc1.21.8-neoforgev0.8.882-mc1.21.8-fabric
1.21.7v0.8.882-mc1.21.8-fabricNot availablev0.8.882-mc1.21.8-neoforgev0.8.882-mc1.21.8-fabric
1.21.6v0.8.882-mc1.21.8-fabricNot availablev0.8.882-mc1.21.8-neoforgev0.8.882-mc1.21.8-fabric
1.21.5v0.8.882-mc1.21.5-fabricNot availablev0.8.882-mc1.21.5-neoforgev0.8.882-mc1.21.5-fabric
1.21.4v0.8.882-mc1.21.4-fabricNot availablev0.8.882-mc1.21.4-neoforgev0.8.882-mc1.21.4-fabric
1.21.3v0.8.882-mc1.21.3-fabricNot availablev0.8.882-mc1.21.3-neoforgev0.8.882-mc1.21.3-fabric
1.21.2v0.8.882-mc1.21.3-fabricNot availablev0.8.882-mc1.21.3-neoforgev0.8.882-mc1.21.3-fabric
1.21.1v0.8.882-mc1.21.1-fabricNot availablev0.8.882-mc1.21.1-neoforgev0.8.882-mc1.21.1-fabric
1.21v0.8.882-mc1.21.1-fabricNot availablev0.8.882-mc1.21.1-neoforgev0.8.882-mc1.21.1-fabric
1.20.x7 of 7 versions with builds
1.19.x5 of 5 versions with builds
1.18.x1 of 1 version with builds
1.17.x1 of 1 version with builds
1.16.x1 of 1 version with builds
1.15.x1 of 1 version with builds
1.14.x1 of 1 version with builds
ReleaseBetaAlphaNot available

This mod also publishes snapshot builds. Snapshots are not shown in the matrix.

Requirements

Dependencies declared by the latest file for each loader.

Optional 2

MaLiLibA library mod for client-side mods. Contains most of the common/shared code of masa's client mods, and adds some inter-operation support between the dependent mods.
Optional
CarpetTake full control over your vanilla game
Optional

Required by 6 mods

Use cases

Gating code by side

A mod can check dependencies separately for its code on the client and on the server, filling gaps in Fabric Loader's own checks.

Who it’s for: Mod developers who maintain code across several Minecraft versions or loaders and need conditional loading that the loader itself does not provide.

Questions

Does MagicLib need other mods to run?

No mod is required. Carpet, MaFgLib and MaLiLib are optional dependencies that extend it.

Which loaders does MagicLib support?

Fabric, Forge, NeoForge and Quilt all have files. The latest Forge file is for 1.20.1, while the other loaders have builds for 26.3.

Which mods use MagicLib?

Six catalog mods require it, including Masa Gadget, Carpet TCTC Addition and HP Display.

In the catalog

MagicLib is one of 3,514 Library mods on ModsFinder, and one of 2,348 Library mods for Fabric. 8,071 mods support Minecraft 26.3.

More from hendrix-shen

All projects

Similar mods

What the author says

❗Before reporting a problem, be sure to try the latest beta version to check if the problem still exists. A library of versatile mod dependencies.
hendrix-shen, on the Modrinth page

Official listing

Owner
hendrix-shen
Published
2022-04-16
Updated on Modrinth
2026-09-27
Facts verified
2026-10-15

Tags