Package net.minecraft.scoreboard.number
Record Class FixedNumberFormat
java.lang.Object
java.lang.Record
net.minecraft.scoreboard.number.FixedNumberFormat
- Record Components:
text-
- All Implemented Interfaces:
NumberFormat
- Mappings:
Namespace Name named net/minecraft/scoreboard/number/FixedNumberFormatintermediary net/minecraft/class_9021official aaknamed textintermediary comp_5121official b
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TextThe field for thetextrecord component.static final NumberFormatType<FixedNumberFormat> -
Constructor Summary
ConstructorsConstructorDescriptionFixedNumberFormat(Text text) Creates an instance of aFixedNumberFormatrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.format(int number) getType()final inthashCode()Returns a hash code value for this object.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
text
The field for thetextrecord component. -
TYPE
- Mappings:
Namespace Name Mixin selector named TYPELnet/minecraft/scoreboard/number/FixedNumberFormat;TYPE:Lnet/minecraft/scoreboard/number/NumberFormatType;intermediary field_47560Lnet/minecraft/class_9021;field_47560:Lnet/minecraft/class_9023;official aLaak;a:Laam;
-
-
Constructor Details
-
FixedNumberFormat
Creates an instance of aFixedNumberFormatrecord class.- Parameters:
text- the value for thetextrecord component
-
-
Method Details
-
format
- Specified by:
formatin interfaceNumberFormat- Mappings:
Namespace Name Mixin selector named formatLnet/minecraft/scoreboard/number/NumberFormat;format(I)Lnet/minecraft/text/MutableText;intermediary method_55457Lnet/minecraft/class_9022;method_55457(I)Lnet/minecraft/class_5250;official aLaal;a(I)Lzb;
-
getType
- Specified by:
getTypein interfaceNumberFormat- Mappings:
Namespace Name Mixin selector named getTypeLnet/minecraft/scoreboard/number/NumberFormat;getType()Lnet/minecraft/scoreboard/number/NumberFormatType;intermediary method_55456Lnet/minecraft/class_9022;method_55456()Lnet/minecraft/class_9023;official aLaal;a()Laam;
-
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). -
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-