Record Class GameRuleCategory
java.lang.Object
java.lang.Record
net.minecraft.world.level.gamerules.GameRuleCategory
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final GameRuleCategorystatic final GameRuleCategoryprivate final IdentifierThe field for theidrecord component.static final GameRuleCategorystatic final GameRuleCategorystatic final GameRuleCategoryprivate static final List<GameRuleCategory> static final GameRuleCategorystatic final GameRuleCategory -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aGameRuleCategoryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.label()private static GameRuleCategorystatic GameRuleCategoryregister(Identifier id) Deprecated.static voidfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
id
The field for theidrecord component. -
SORT_ORDER
-
PLAYER
-
MOBS
-
SPAWNING
-
DROPS
-
UPDATES
-
CHAT
-
MISC
-
-
Constructor Details
-
GameRuleCategory
Creates an instance of aGameRuleCategoryrecord class.- Parameters:
id- the value for theidrecord component
-
-
Method Details
-
getDescriptionId
-
register
-
register
Deprecated.Prefer registering usingRegisterGameRuleCategoryEvent -
label
-
registerModdedCategories
@Internal public static void registerModdedCategories() -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
RegisterGameRuleCategoryEvent