Back to mods
LibGamerule project artwork

CurseForge · Minecraft mod

LibGamerule

A library mod to add gamerules

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which LibGamerule release should I use?

Updated 6 years ago
Latest stable file libgamerule-0.0.6-1.16.1.jar
Game version 1.16.1
Loader Fabric

libgamerule-0.0.6-1.16.1.jar targets 1.16.1 with Fabric. The project page does not say whether this file belongs on the client, dedicated server, or both. All 1 required mods have matching files.

Where it goes

Is LibGamerule required on the client, server, or both?

The project page does not say whether this file belongs on the client, dedicated server, or both.

Client Source doesn’t say
Dedicated server Source doesn’t say
Loader for this release Fabric
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source does not explicitly classify this release as client-only or server-only.

What else does libgamerule-0.0.6-1.16.1.jar need?

libgamerule-0.0.6-1.16.1.jar. Change the file and its required mods may change too.

All 1 required mods have matching files

Install Fabric API first. We found matching files for this game-version and loader setup.

LibCapableData (LibCD) Optional for libgamerule-0.0.6-1.16.1.jar
optional
Matching file found Matched file: 2.5.0+1.16.1
Fabric API Needed by libgamerule-0.0.6-1.16.1.jar
required
Matching file found Matched file: [1.16.1] Fabric API 0.18.0 build 387

We only count dependency files that match this setup. A file for another loader does not fill the gap.

Before you install it

Add LibGamerule without breaking your instance.

Built for libgamerule-0.0.6-1.16.1.jar. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use libgamerule-0.0.6-1.16.1.jar. It targets 1.16.1 with Fabric; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    Install Fabric API first. We found matching files for this game-version and loader setup.

  3. 03

    Put it on the correct side

    The project page does not say whether this file belongs on the client, dedicated server, or both.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside libgamerule-0.0.6-1.16.1.jar. It opens that exact file at the source.

About this project

What does LibGamerule add?

LibGamerule

Libgamerule allows for easily adding custom gamerules on the Fabric modloader.

Usage (for mod devs)

`
// Adding a boolean gamerule
GameRules.RuleKey MY_GAMERULE = Gamerule.register(
​ ​ ​ ​ "myGameRule", // name in /gamerule
​ ​ ​ ​ BooleanRule.create(true) // default to true
);

// Get the gamerule data
boolean value = Gamerule.get(MY_GAMERULE);
`

Supported Rule types:

  • BooleanRule
  • DoubleRule (+min/max)
  • IntRule (+min/max)
  • EnumRule (Any Enum)
  • StringRule (greedy strings)

Libcd support (datapack/modpack devs)

Conditions (note: does not support enums)

{ ​ ​ "when": [ ​ ​ ​ ​ { ​ ​ ​ ​ ​ ​ "comment": "Boolean gamerule check", ​ ​ ​ ​ ​ ​ "libgamerule:gamerule_has_value": "my_gamerule" ​ ​ ​ ​ }, ​ ​ ​ ​ { ​ ​ ​ ​ ​ ​ "comment": "Typed gamerule check", ​ ​ ​ ​ ​ ​ "libgamerule:gamerule_has_value": { ​ ​ ​ ​ ​ ​ ​ ​ "name": "my_gamerule_typed", ​ ​ ​ ​ ​ ​ ​ ​ "type": "int", ​ ​ ​ ​ ​ ​ ​ ​ "value": 10 ​ ​ ​ ​ ​ ​ } ​ ​ ​ ​ } ​ ​ ] }

Creating gamerules in scripts

var GameruleTweaker = libcd.require("libgamerule.GameruleTweaker"); GameruleTweaker.addGamerule("my_gamerule", "boolean", false); GameruleTweaker.addGamerule("my_gamerule_typed", "integer", 7);

Project description from CurseForge.

Pick your setup

LibGamerule by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

3 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

LibGamerule versions and loaders

9 of 9 releases match

Looking for an older file? The official CurseForge project page is in Resources.