Unruled API
Vanilla Minecraft gamerules are a handy tool, but they come with a hard limit: every rule is either a boolean or an integer. For map makers and mod developers who want players to tweak text values, decimals, or predefined choices, that ceiling gets frustrating fast. Unruled API is a lightweight library mod built to break through it, giving you the tools to register gamerules of almost any data type with minimal boilerplate.
What Unruled API Actually Does
At its core, this is a developer-facing library rather than a gameplay mod. It does not register new gamerules on its own. Instead, it hands you a set of generative static methods in the mc.recraftors.unruled_api.UnruledApi class, which you call to build rules of the type you need. Floating point numbers, longs, doubles, strings, free text, and enum-driven values are all on the table. For consistency, the same API also lets you instantiate standard vanilla gamerules, so your registration code stays uniform across old and new rules.
A typical registration block looks refreshingly short. You call your own registration method, then assign each rule using helpers such as UnruledApi.createFloat(1.5) for a decimal, UnruledApi.createString("some text") for text, or UnruledApi.createBoolean(false, callback) when you want a change listener attached. That callback receives the server and the rule, so you can react to edits immediately, whether that means refreshing a config, resyncing data, or triggering an in-game event.
Reading Values Back Out
Writing rules is only half the job. Unruled API exposes the IGameRulesProvider interface so you can query your custom rules cleanly. Cast the game rules object to the provider and call methods like unruled_getString or unruled_getFloat to pull the current value. No reflection hacks, no fragile workarounds, just typed getters that behave the way you would expect.
Supported Versions and Mod Loaders
Unruled API is distributed for Fabric-based development and is published through the Modrinth Maven repository, which keeps dependency management straightforward for Loom and ForgeGradle projects alike. Because it is a library, the Minecraft version you target should match the build you pull in, so check the project page for the exact release that lines up with your mod's supported game version before wiring it into your build script. If you are setting up a development environment and want the fastest route from zero to a working project, the foxygame.net launcher can install Unruled API alongside a matching mod profile in a single click, which saves you from manually chasing compatible builds.
Adding It to Your Project
Integration follows the usual Maven pattern. Add the Modrinth repository to your repositories block, then declare the dependency. With Loom, use modApi so that projects depending on yours inherit the library automatically. With ForgeGradle, a plain implementation line does the job. Keep the version in a property such as unruled_version so updates stay painless.
- Add the Modrinth Maven repository URL to your build file.
- Declare the dependency using modApi or implementation depending on your toolchain.
- Call the UnruledApi factory methods during gamerule registration.
- Query values at runtime through IGameRulesProvider.
How to Install Unruled API for Players and Pack Authors
If you are not writing code, you likely encountered this mod as a dependency of another mod or modpack. In that case, how to install is simple: drop the matching jar into your mods folder alongside the mod that requires it, and make sure both target the same Minecraft version and loader. When you download Unruled API for Minecraft, always grab the build that matches your game version rather than the newest file on the list, since a mismatch will crash on startup. Pack authors should note the licensing terms: the author asks that you do not bundle the jar inside your own mod through jar-in-jar, shadowing, or similar techniques.
Final Thoughts
Unruled API fills a genuine gap in Minecraft modding. By turning gamerules into a flexible, typed system with callbacks and clean getters, it lets developers ship configuration options that vanilla simply cannot express. Whether you are building a sprawling adventure map or a small quality-of-life mod, this library removes a stubborn limitation and replaces it with a few lines of readable code.