
Что это
Expands on the vanilla gamerules, adding new gamerules types for other mods to use and enabling players to set per-dimension overrides for gamerules
- Тип: мод
- Загрузчик: fabric, forge, neoforge, quilt
- Версии Minecraft: 1.18 – 26.3
- Скачиваний на Modrinth: 47 072
Подробно
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.unruledapi.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.
Example: java import com.nerjal.unruledapi.UnruledApi;
public class MyClass { private static final int STRINGRULEMAXLENGTH = 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:mygamerule"); // 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", STRINGRULEMAXLENGTH) // 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:myothergamerule"); }
Additionally, quick creation and registration methods have been added for your convenience
java import com.nerjal.unruledapi.UnruledApi;
public static void quickGamerulesRegistration() { var myLongRule = UnruledApi.registerLong(Identifier.of("mymod:mylongrule"), 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("mym
Как установить
Скачайте файл на официальной странице ниже и положите его в папку mods (для модов) или plugins (для плагинов) вашего сервера или клиента. Для модов нужен совместимый загрузчик. Версия должна совпадать с версией Minecraft.
Текст подготовлен автоматически из описания на Modrinth и ждёт проверки редакцией.
Комментарии 0
Комментарии к этому материалу отключены.
Читайте также
Smithing Upgradeable Tools
Make some tools upgradables in the smithing table 05.12.2026
Persistent Mining
Saves block breaking progress so you can continue mining later. 05.12.2026
EnderiumOre
Enderium is a new ore for the end, just as the nether has netherite now the end has Enderium 05.12.2026
Abyssal Shop
This Is A Simple Plugin With A Currency And Shop, Auction House, Sell, Gamble, And Operator Commands Such As /givemoney /setmoney… 05.12.2026
Bed Icons
combines the old bed icons with the new model in one pack 05.12.2026
Depiglining
Reverts speedrunning nerfs from 1.16.2+ like Piglin Brutes and bartering 05.12.2026