Record Class FixedNumberFormat

java.lang.Object
java.lang.Record
net.minecraft.scoreboard.number.FixedNumberFormat
Record Components:
text -
All Implemented Interfaces:
NumberFormat

public record FixedNumberFormat(Text text) extends Record implements NumberFormat
Mappings:
Namespace Name
named net/minecraft/scoreboard/number/FixedNumberFormat
intermediary net/minecraft/class_9021
official aak
named text
intermediary comp_5121
official b
  • Field Details

    • text

      private final Text text
      The field for the text record component.
    • TYPE

      public static final NumberFormatType<FixedNumberFormat> TYPE
      Mappings:
      Namespace Name Mixin selector
      named TYPE Lnet/minecraft/scoreboard/number/FixedNumberFormat;TYPE:Lnet/minecraft/scoreboard/number/NumberFormatType;
      intermediary field_47560 Lnet/minecraft/class_9021;field_47560:Lnet/minecraft/class_9023;
      official a Laak;a:Laam;
  • Constructor Details

    • FixedNumberFormat

      public FixedNumberFormat(Text text)
      Creates an instance of a FixedNumberFormat record class.
      Parameters:
      text - the value for the text record component
  • Method Details

    • format

      public MutableText format(int number)
      Specified by:
      format in interface NumberFormat
      Mappings:
      Namespace Name Mixin selector
      named format Lnet/minecraft/scoreboard/number/NumberFormat;format(I)Lnet/minecraft/text/MutableText;
      intermediary method_55457 Lnet/minecraft/class_9022;method_55457(I)Lnet/minecraft/class_5250;
      official a Laal;a(I)Lzb;
    • getType

      Specified by:
      getType in interface NumberFormat
      Mappings:
      Namespace Name Mixin selector
      named getType Lnet/minecraft/scoreboard/number/NumberFormat;getType()Lnet/minecraft/scoreboard/number/NumberFormatType;
      intermediary method_55456 Lnet/minecraft/class_9022;method_55456()Lnet/minecraft/class_9023;
      official a Laal;a()Laam;
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • text

      public Text text()
      Returns the value of the text record component.
      Returns:
      the value of the text record component