Record Class LanguageInfo
java.lang.Object
java.lang.Record
net.minecraft.client.resources.language.LanguageInfo
-
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
The field for thebidirectional
record component.static final com.mojang.serialization.Codec
<LanguageInfo> private final String
The field for thename
record component.private final String
The field for theregion
record component. -
Constructor Summary
ConstructorDescriptionLanguageInfo
(String region, String name, boolean bidirectional) Creates an instance of aLanguageInfo
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the value of thebidirectional
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.region()
Returns the value of theregion
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
region
The field for theregion
record component. -
name
The field for thename
record component. -
bidirectional
private final boolean bidirectionalThe field for thebidirectional
record component. -
CODEC
-
-
Constructor Details
-
LanguageInfo
Creates an instance of aLanguageInfo
record class.- Parameters:
region
- the value for theregion
record componentname
- the value for thename
record componentbidirectional
- the value for thebidirectional
record 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 theregion
record component.- Returns:
- the value of the
region
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
bidirectional
public boolean bidirectional()Returns the value of thebidirectional
record component.- Returns:
- the value of the
bidirectional
record component
-