Skip to main content
Version: Minecraft 26.2

dev.polymodloader.api.content.rule

Generated

This page is generated from the source's Javadoc by ./gradlew apiReference. Do not edit it; fix the source comment and generate it again.

TypeKindDescription
GameRuleCategoryenumThe section a game rule is listed under in the game's rule screen.
GameRuleKeyrecordA declared game rule, set per world with /gamerule <id> <value> and read with WorldView.gameRule(key).

GameRuleCategory​

enum · Stability PREVIEW · Since 0.1.0-alpha.4 or earlier

public enum GameRuleCategory

The section a game rule is listed under in the game's rule screen.

ConstantDescription
PLAYER—
MOBS—
SPAWNING—
DROPS—
UPDATES—
CHAT—
MISC—

GameRuleKey​

record · Stability PREVIEW · Since 0.1.0-alpha.4 or earlier

public record GameRuleKey<T>(ResourceId id, Class<T> type, T defaultValue, int min, int max, GameRuleCategory category)

A declared game rule, set per world with /gamerule <id> <value> and read with WorldView.gameRule(key).

ComponentTypeDescription
idResourceIdrule ID, <mod id>:<path>
typeClass<T>value class
defaultValueTvalue in new worlds
minintsmallest allowed integer (ignored for booleans)
maxintlargest allowed integer (ignored for booleans)
categoryGameRuleCategoryrule screen section
Buy me a coffee