Record Class StyledNumberFormat

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

public record StyledNumberFormat(Style style) extends Record implements NumberFormat
Mappings:
Namespace Name
named net/minecraft/scoreboard/number/StyledNumberFormat
intermediary net/minecraft/class_9025
official aao
named style
intermediary comp_5122
official e
  • Field Details

    • style

      private final Style style
      The field for the style record component.
    • TYPE

      public static final NumberFormatType<StyledNumberFormat> TYPE
      Mappings:
      Namespace Name Mixin selector
      named TYPE Lnet/minecraft/scoreboard/number/StyledNumberFormat;TYPE:Lnet/minecraft/scoreboard/number/NumberFormatType;
      intermediary field_47565 Lnet/minecraft/class_9025;field_47565:Lnet/minecraft/class_9023;
      official a Laao;a:Laam;
    • EMPTY

      public static final StyledNumberFormat EMPTY
      Mappings:
      Namespace Name Mixin selector
      named EMPTY Lnet/minecraft/scoreboard/number/StyledNumberFormat;EMPTY:Lnet/minecraft/scoreboard/number/StyledNumberFormat;
      intermediary field_47566 Lnet/minecraft/class_9025;field_47566:Lnet/minecraft/class_9025;
      official b Laao;b:Laao;
    • RED

      public static final StyledNumberFormat RED
      Mappings:
      Namespace Name Mixin selector
      named RED Lnet/minecraft/scoreboard/number/StyledNumberFormat;RED:Lnet/minecraft/scoreboard/number/StyledNumberFormat;
      intermediary field_47567 Lnet/minecraft/class_9025;field_47567:Lnet/minecraft/class_9025;
      official c Laao;c:Laao;
    • YELLOW

      public static final StyledNumberFormat YELLOW
      Mappings:
      Namespace Name Mixin selector
      named YELLOW Lnet/minecraft/scoreboard/number/StyledNumberFormat;YELLOW:Lnet/minecraft/scoreboard/number/StyledNumberFormat;
      intermediary field_47568 Lnet/minecraft/class_9025;field_47568:Lnet/minecraft/class_9025;
      official d Laao;d:Laao;
  • Constructor Details

    • StyledNumberFormat

      public StyledNumberFormat(Style style)
      Creates an instance of a StyledNumberFormat record class.
      Parameters:
      style - the value for the style 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.
    • style

      public Style style()
      Returns the value of the style record component.
      Returns:
      the value of the style record component