ModsFinder

Formula Loader

by OftenOviour

Formula Loader is a library that reads custom math formulas from JSON files and evaluates them in-game with parameters passed through commands.

FabricForgeNeoForgeServer required, client optionalGNU Lesser General Public License v2.1 onlyOpen source1.18.2 – 26.1.2

What it does

Formula Loader loads formulas from datapack JSON files at startup, so modders and datapack creators can define arithmetic expressions without writing Java. Each formula takes named parameters, which are supplied through an in-game command and evaluated on the fly. A FormulaBuilder class lets developers construct formula JSON programmatically instead of writing the files by hand.

Once loaded, each formula is compiled into a stack-based bytecode virtual machine. The library reports per-evaluation timings of about 9 ns for simple arithmetic, 14 ns for three sequential steps, 15 ns for chained conditionals with three branches, and 40 ns for trigonometry with rounding.

It is required on the server and optional for players. It is open source under the GNU Lesser General Public License v2.1 only, and it is published for Fabric, Forge and NeoForge across 19 release versions, 1.18.2 – 26.1.2. TConstruct Armor Extension requires it.

Key features

  1. JSON formula files

    Formulas are defined in JSON, so datapack users can add or change them without recompiling a mod.

  2. Operator and function set

    Arithmetic operators, min, max, pow, log, div, floor division, rounding functions and the sin, cos, tan and inverse trigonometric functions are available.

  3. Unary minus without parentheses

    Expressions such as -3, -x or -min(b, 1) + -x parse without needing extra parentheses.

  4. Programmatic construction

    The FormulaBuilder class builds formula JSON in code, which suits generators and tools that create many formulas.

  5. Compiled evaluation

    Formulas are compiled to bytecode when loaded, with constant folding and opcode merging to shorten evaluation.

Compatibility

Latest build for each game version and loader.

26.x3 of 3 versions with builds
26.1.2Not available3.0.6Not available
26.1.1Not available3.0.6Not available
26.1Not available3.0.6Not available
1.21.x11 of 11 versions with builds
1.21.11Not available3.0.6Not available
1.21.10Not available3.0.6-finalNot available
1.21.9Not available3.0.6-finalNot available
1.21.83.0.63.0.6-final3.0.6
1.21.73.0.6Not available3.0.6
1.21.63.0.6Not available3.0.6
1.21.53.0.63.0.6-final3.0.6
1.21.43.0.63.0.63.0.6
1.21.33.0.63.0.63.0.6
1.21.23.0.63.0.63.0.6
1.21.13.0.63.0.63.0.6
1.20.x1 of 1 version with builds
1.19.x3 of 3 versions with builds
1.18.x1 of 1 version with builds
ReleaseBetaAlphaNot available

Only full game releases are shown. This mod publishes no snapshot builds.

Required by 1 mod

Use cases

Who it’s for: The library suits datapack creators and mod developers who want formulas that are edited as data. Players who only play with other mods do not need to interact with it directly.

Questions

Does Formula Loader have to be installed on the client?

No. The server must run it, while players may leave it out.

Which loaders does Formula Loader support?

Fabric, Forge and NeoForge all have files. The latest Fabric and NeoForge builds are 3.0.6 for 1.21.8, and the latest Forge build is 3.0.6 for 26.1.2.

Which mods require Formula Loader?

TConstruct Armor Extension requires it, so Formula Loader must be installed on any server running that mod.

In the catalog

Formula Loader is one of 3,514 Library mods on ModsFinder, and one of 2,348 Library mods for Fabric. 15,189 mods support Minecraft 26.1.2.

More from OftenOviour

All projects

Similar mods

What the author says

Arithmetic operators: +, -,, /, % (floor remainder: a - floor(a / b) b) Two-argument formulas: min(x, y), max(x, y), pow(x, y), log(x, y) (logarithm base x of y), div(x, y) (floor division toward negative infinity)
OftenOviour, on the Modrinth page

Official listing

Owner
OftenOviour
Published
2026-06-08
Updated on Modrinth
2026-06-18
Facts verified
2026-10-15

Tags