Game rule

Game rule is a customizable parameter for a specific in-game world

NeoForge 26.1.2NeoForge 1.21.1

Step-by-step guide: how to make game rule →

Fields you fill in

Category

This is the game rule category. It's used for the classification of the

game rules depending on what they do.

Use vanilla names from the dropdown to use existing vanilla game rule categories.

Enter a custom name to use mod-namespaced game rule categories.

Default value

This is the game rule default value. The game rule will have this value until something in the game (player or command) changes it.

Game rule description

This is the game rule description. It is used on the game rules setting screen when hovered over.

Game rule name

This is the game rule display name. It is used on the game rules setting screen.

Machine name

This is the game rule name which is displayed in-game in commands to modify/enable the game rules.

Game rule type

This is the game rule type. You must select the best type depending on your plan(s)

  • Number means the game rule can only be modified to be a number (integer)
  • Logic means the game rule can only be a boolean (true or false)