Record Class StyledFormat
java.lang.Object
java.lang.Record
net.minecraft.network.chat.numbers.StyledFormat
- All Implemented Interfaces:
NumberFormat
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StyledFormatstatic final StyledFormatstatic final StyledFormatprivate final StyleThe field for thestylerecord component.static final NumberFormatType<StyledFormat> -
Constructor Summary
ConstructorsConstructorDescriptionStyledFormat(Style style) Creates an instance of aStyledFormatrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.format(int p_313770_) final inthashCode()Returns a hash code value for this object.style()Returns the value of thestylerecord component.final StringtoString()Returns a string representation of this record class.type()
-
Field Details
-
style
The field for thestylerecord component. -
TYPE
-
NO_STYLE
-
SIDEBAR_DEFAULT
-
PLAYER_LIST_DEFAULT
-
-
Constructor Details
-
StyledFormat
Creates an instance of aStyledFormatrecord class.- Parameters:
style- the value for thestylerecord component
-
-
Method Details
-
format
- Specified by:
formatin interfaceNumberFormat
-
type
- Specified by:
typein interfaceNumberFormat
-
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). -
style
Returns the value of thestylerecord component.- Returns:
- the value of the
stylerecord component
-