public final class CustomGameRuleCategory extends Object
Minecraft provides
.Constructor and Description |
---|
CustomGameRuleCategory(net.minecraft.util.Identifier id,
net.minecraft.text.Text name)
Creates a custom game rule category.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static <T extends net.minecraft.world.GameRules.Rule<T>> |
getCategory(net.minecraft.world.GameRules.Key<T> key)
Gets the custom category a
game rule key is registered to. |
net.minecraft.util.Identifier |
getId() |
net.minecraft.text.Text |
getName() |
int |
hashCode() |
public CustomGameRuleCategory(net.minecraft.util.Identifier id, net.minecraft.text.Text name)
id
- the id of this categoryname
- the name of this categorypublic net.minecraft.util.Identifier getId()
public net.minecraft.text.Text getName()
public static <T extends net.minecraft.world.GameRules.Rule<T>> Optional<CustomGameRuleCategory> getCategory(net.minecraft.world.GameRules.Key<T> key)
game rule key
is registered to.T
- the type of value the rule holdskey
- the rule keyempty