Record Class LanguageInfo
java.lang.Object
java.lang.Record
net.minecraft.client.resources.language.LanguageInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for thebidirectionalrecord component.static final com.mojang.serialization.Codec<LanguageInfo>private final StringThe field for thenamerecord component.private final StringThe field for theregionrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionLanguageInfo(String region, String name, boolean bidirectional) Creates an instance of aLanguageInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thebidirectionalrecord 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.region()Returns the value of theregionrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
region
The field for theregionrecord component. -
name
The field for thenamerecord component. -
bidirectional
private final boolean bidirectionalThe field for thebidirectionalrecord component. -
CODEC
-
-
Constructor Details
-
LanguageInfo
Creates an instance of aLanguageInforecord class.- Parameters:
region- the value for theregionrecord componentname- the value for thenamerecord componentbidirectional- the value for thebidirectionalrecord component
-
-
Method Details
-
toComponent
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
region
Returns the value of theregionrecord component.- Returns:
- the value of the
regionrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
bidirectional
public boolean bidirectional()Returns the value of thebidirectionalrecord component.- Returns:
- the value of the
bidirectionalrecord component
-