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.
| Type | Kind | Description |
|---|---|---|
GameRuleCategory | enum | The section a game rule is listed under in the game's rule screen. |
GameRuleKey | record | A 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.
| Constant | Description |
|---|---|
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).
| Component | Type | Description |
|---|---|---|
id | ResourceId | rule ID, <mod id>:<path> |
type | Class<T> | value class |
defaultValue | T | value in new worlds |
min | int | smallest allowed integer (ignored for booleans) |
max | int | largest allowed integer (ignored for booleans) |
category | GameRuleCategory | rule screen section |