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 value) 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
-
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). -
style
Returns the value of thestylerecord component.- Returns:
- the value of the
stylerecord component
-