Record Class CommonGameRuleRegister.GameRuleData<T extends net.minecraft.world.level.GameRules.Value<T>>
java.lang.Object
java.lang.Record
info.u_team.u_team_core.impl.common.CommonGameRuleRegister.GameRuleData<T>
- Enclosing class:
- CommonGameRuleRegister
protected static record CommonGameRuleRegister.GameRuleData<T extends net.minecraft.world.level.GameRules.Value<T>>(String name, net.minecraft.world.level.GameRules.Category category, Supplier<? extends net.minecraft.world.level.GameRules.Type<T extends net.minecraft.world.level.GameRules.Value<T>>> type)
extends Record
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGameRuleData(String name, net.minecraft.world.level.GameRules.Category category, Supplier<? extends net.minecraft.world.level.GameRules.Type<T>> type) Creates an instance of aGameRuleDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.GameRules.Categorycategory()Returns the value of thecategoryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
GameRuleData
protected GameRuleData(String name, net.minecraft.world.level.GameRules.Category category, Supplier<? extends net.minecraft.world.level.GameRules.Type<T>> type) Creates an instance of aGameRuleDatarecord class.- Parameters:
name- the value for thenamerecord componentcategory- the value for thecategoryrecord componenttype- the value for thetyperecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
category
public net.minecraft.world.level.GameRules.Category category()Returns the value of thecategoryrecord component.- Returns:
- the value of the
categoryrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-