Unruled API
🟡 Updated this year⚠️ Install Order · 2 steps
Install in this order, then this mod last — most mods fail to load without their framework and dependencies in place.
🖼️ Gallery (1 images)
🔍 Analysis
- 👍 0.1% endorsement rate
- 🏆 #800 of 983 fabric mods in this game by downloads
📋 About This Mod
# Unruled API <img src="https://cdn.modrinth.com/data/pZ0PWFaa/images/74b5f15e18065a3b3e94dcc05f759b6feb241ca2.png" alt="mod icon" height="318" width="318"> Allows to create new form of gamerules, beyond the restrictive vanilla integers and booleans. This mod enables developers to easily create new floating, long, double, string, text, enum-driven, entity selector and even registry-entry gamerules, using their respective builders, all available from the `com.nerjal.unruled_api.UnruledApi` class's static methods. It also provides means to add value validators alongside registering new gamerules, which in turn allows to restrict the range of valid values for gamerules. For instance, it can be used to only allow odd values in an integer gamerule. Additionally, this mod also adds per-dimension gamerule overrides! These are applied in their strict dimension (provided they are queried correctly). See (#gamerules-overrides) for more details about it. ### Gamerules registration Example: ```java import com.nerjal.unruled_api.UnruledApi; public class MyClass { private static final int STRING_RULE_MAX_LENGTH = 24; public void gamerulesRegistration() { var myFloatingRule = UnruledApi.floatRuleBuilder(category, 1.5) // takes the category and the initial value as arguments // the category determines where in the world creation screen will it be placed .register("mymod:my_gamerule"); // gamerule registration always takes the gamerule's ID // the ID also determines the translated name of the gamerule var myStringRule = new StringRule.Builder(category, "initial value", STRING_RULE_MAX_LENGTH) // using the UnruledApi methods or directly creating the builder has the same result, and arguments are the same. // however, mind that in some cases, it is strongly recommended to use the specified builders such as for string // rules, enum, and dynamic registry entry rules, as they have a more specific processing of their values and // command handling. .register("mymod:my_other_gamerule"); } } ``` Additionally, quick creation and registration methods have been added for your convenience ```java import com.nerjal.unruled_api.UnruledApi; public static void quickGamerulesRegistration() { var myLongRule = UnruledApi.registerLong(Identifier.of("mymod:my_long_rule"), category, 25L); // Quick registration methods always follow the same parameter order: name, category, initial value, gamerule-type specific arguments // Except for enum rules, for which the enum class goes before the initial value var myEnumRule = UnruledApi.registerEnumRule(Identifier.of("mymod:my_enum_rule"), category, MyEnum.FIRST, MyEnum.class); } enum MyEnum { FIRST, SECOND, THIRD } ``` For consistency, methods have also been created to allow quickly register vanilla-type gamerules. ```java import com.nerjal.unruled_api.UnruledApi; public static void registerBasicRules() { UnruledApi.registerInteger("my_int_rule", category, 5); UnruledApi.registerBoolean("my_bool_rule", category, false); } ``` ~~You can also retrieve their values using the same class's methods~~<br> This has become outdated since release 2.0 (for Minecraft 1.21.11 and later). Please use the gamerule methods directly as now meant by the game code. ```java public long getMyLongGamerules(ServerWorld dimension) { // ServerWorld is a Yarn mapping class. Might be Level or ServerLevel with Mojmap return UnruledApi.getLong(dimension.getGameRules(), myLongGamerule); } public Block getMyBlockRule(ServerWorld dimension) { // querying a registry entry rule returns the registry entry's very value, as it can only be set if it exists in the registry return UnruledApi.getRegistryEntry(dimension.getGameRules(), myBlockRegistryEntryRule); } ``` ### Command Tweaks The average experience of using gamerules in vanilla minecraft is pretty poor. Navigating a long list of names, trying to remember the one of the rule you need, or even worse, searching for a hypothetic one, can be pretty annoying. Thus, Unruled API aims to alleviate that burden ever so slightly, by allowing you to navigate the same list *by category*! Hence, you can now add the category name or full ID (both in full caps) in the command and the following list will only contain rules in the appropriate category. E.g. `/gamerule CHAT ` will then have your game suggest you only the rules inside the *chat* category, according to the world creation menu listing. This also applies to all modded gamerules and categories, as well as modded gamerule types from any and all mod. ``` /gamerule <gamerule name or ID> ``` ### Gamerules Overrides Gamerules overrides are set per dimension. They al
# Unruled API

Allows to create new form of gamerules, beyond the restrictive vanilla integers and booleans.
This mod enables developers to easily create new floating, long, double, string, text, enum-driven, entity selector and even registry-entry gamerules, using their respective builders, all available from the `com.nerjal.unruled_api. UnruledApi` class's static methods.
It also provides means to add value validators alongside registering new gamerules, which in turn allows to restrict the range of valid values for gamerules. For instance, it can be used to only allow odd values in an integer gamerule.
Additionally, this mod also adds per-dimension gamerule overrides! These are applied in their strict dimension (provided they are queried correctly). See (#gamerules-overrides) for more details about it.
### Gamerules registration
Example: ```java import com.nerjal.unruled_api. UnruledApi;
public class MyClass { private static final int STRING_RULE_MAX_LENGTH = 24;
public void gamerulesRegistration() { var myFloatingRule = UnruledApi.floatRuleBuilder(category, 1. 5) // takes the category and the initial value as arguments // the category determines where in the world creation screen will it be placed .register("mymod:my_gamerule"); // gamerule registration always takes the gamerule's ID // the ID also determines the translated name of the gamerule var myStringRule = new StringRule. Builder(category, "initial value", STRING_RULE_MAX_LENGTH) // using the UnruledApi methods or directly creating the builder has the same result, and arguments are the same. // however, mind that in some cases, it is strongly recommended to use the specified builders such as for string // rules, enum, and dynamic registry entry rules, as they have a more specific processing of their values and // command handling. .register("mymod:my_other_gamerule"); }
Additionally, quick creation and registration methods have been added for your convenience
```java import com.nerjal.unruled_api. UnruledApi;
public static void quickGamerulesRegistration() { var myLongRule = UnruledApi.registerLong(Identifier.of("mymod:my_long_rule"), category, 25L); // Quick registration methods always follow the same parameter order: name, category, initial value, gamerule-type specific arguments // Except for enum rules, for which the enum class goes before the initial value var myEnumRule = UnruledApi.registerEnumRule(Identifier.of("mymod:my_enum_rule"), category, MyEnum. FIRST, MyEnum.class); } enum MyEnum { FIRST, SECOND, THIRD } ```
For consistency, methods have also been created to allow quickly register vanilla-type gamerules.
```java import com.nerjal.unruled_api. UnruledApi;
public static void registerBasicRules() { UnruledApi.registerInteger("my_int_rule", category, 5); UnruledApi.registerBoolean("my_bool_rule", category, false); } ```
~~You can also retrieve their values using the same class's methods~~
This has become outdated since release 2. 0 (for Minecraft 1. 21. 11 and later). Please use the gamerule methods directly as now meant by the game code.
```java public long getMyLongGamerules(ServerWorld dimension) { // ServerWorld is a Yarn mapping class. Might be Level or ServerLevel with Mojmap return UnruledApi.getLong(dimension.getGameRules(), myLongGamerule); } public Block getMyBlockRule(ServerWorld dimension) { // querying a registry entry rule returns the registry entry's very value, as it can only be set if it exists in the registry return UnruledApi.getRegistryEntry(dimension.getGameRules(), myBlockRegistryEntryRule); } ```
### Command Tweaks
The average experience of using gamerules in vanilla minecraft is pretty poor. Navigating a long list of names, trying to remember the one of the rule you need, or even worse, searching for a hypothetic one, can be pretty annoying.
Thus, Unruled API aims to alleviate that burden ever so slightly, by allowing you to navigate the same list by category!
Hence, you can now add the category name or full ID (both in full caps) in the command and the following list will only contain rules in the appropriate category.
E.g. `/gamerule CHAT ` will then have your game suggest you only the rules inside the chat category, according to the world creation menu listing.
This also applies to all modded gamerules and categories, as well as modded gamerule types from any and all mod.
```
/gamerule [
### Gamerules Overrides
Gamerules overrides are set per dimension. They al
📊 Mod Details
- Game
- Minecraft Mods
- Author
- Nerjal_Nosk
- Version
- 2.3.3+26.2
- Downloads
- 40,197
- Endorsements
- 21
- Category
- fabric
- Created
- 1/28/2024
- Updated
- 6/20/2026
- Game Versions
- 26.2
- Tags
- game-mechanics, library, utility
🔧 How to Install Minecraft Mods Mods
Download from Modrinth. Use Prism Launcher or drop into your mods folder.
📖 Full step-by-step install guide for Minecraft Mods →
Visit the official mod page for specific installation instructions for this mod.
🎮 Need cheat codes or console commands? Check ur gaming wiki for Minecraft Mods commands, item IDs, and more.
❓ Frequently Asked Questions
Which Minecraft Mods versions does Unruled API support?
The author lists 26.2. Other versions may work but are untested by the author.
What is the latest version of Unruled API?
Version 2.3.3+26.2, published 2026-06-20 with 40,197 downloads recorded at the source.
Keep browsing — more Minecraft Mods mods await