Package guideme.style

Record Class ResolvedTextStyle

java.lang.Object
java.lang.Record
guideme.style.ResolvedTextStyle

public record ResolvedTextStyle(float fontScale, boolean bold, boolean italic, boolean underlined, boolean strikethrough, boolean obfuscated, net.minecraft.resources.ResourceLocation font, ColorValue color, WhiteSpaceMode whiteSpace, TextAlignment alignment, boolean dropShadow) extends Record
Represents the styling of text for rendering.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ResolvedTextStyle(float fontScale, boolean bold, boolean italic, boolean underlined, boolean strikethrough, boolean obfuscated, net.minecraft.resources.ResourceLocation font, ColorValue color, WhiteSpaceMode whiteSpace, TextAlignment alignment, boolean dropShadow)
    Creates an instance of a ResolvedTextStyle record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the alignment record component.
    boolean
    Returns the value of the bold record component.
    Returns the value of the color record component.
    boolean
    Returns the value of the dropShadow record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    net.minecraft.resources.ResourceLocation
    Returns the value of the font record component.
    float
    Returns the value of the fontScale record component.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the italic record component.
    boolean
    Returns the value of the obfuscated record component.
    boolean
    Returns the value of the strikethrough record component.
    final String
    Returns a string representation of this record class.
    boolean
    Returns the value of the underlined record component.
    Returns the value of the whiteSpace record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ResolvedTextStyle

      public ResolvedTextStyle(float fontScale, boolean bold, boolean italic, boolean underlined, boolean strikethrough, boolean obfuscated, net.minecraft.resources.ResourceLocation font, ColorValue color, WhiteSpaceMode whiteSpace, TextAlignment alignment, boolean dropShadow)
      Creates an instance of a ResolvedTextStyle record class.
      Parameters:
      fontScale - the value for the fontScale record component
      bold - the value for the bold record component
      italic - the value for the italic record component
      underlined - the value for the underlined record component
      strikethrough - the value for the strikethrough record component
      obfuscated - the value for the obfuscated record component
      font - the value for the font record component
      color - the value for the color record component
      whiteSpace - the value for the whiteSpace record component
      alignment - the value for the alignment record component
      dropShadow - the value for the dropShadow record component
  • Method Details

    • 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 o)
      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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • fontScale

      public float fontScale()
      Returns the value of the fontScale record component.
      Returns:
      the value of the fontScale record component
    • bold

      public boolean bold()
      Returns the value of the bold record component.
      Returns:
      the value of the bold record component
    • italic

      public boolean italic()
      Returns the value of the italic record component.
      Returns:
      the value of the italic record component
    • underlined

      public boolean underlined()
      Returns the value of the underlined record component.
      Returns:
      the value of the underlined record component
    • strikethrough

      public boolean strikethrough()
      Returns the value of the strikethrough record component.
      Returns:
      the value of the strikethrough record component
    • obfuscated

      public boolean obfuscated()
      Returns the value of the obfuscated record component.
      Returns:
      the value of the obfuscated record component
    • font

      public net.minecraft.resources.ResourceLocation font()
      Returns the value of the font record component.
      Returns:
      the value of the font record component
    • color

      public ColorValue color()
      Returns the value of the color record component.
      Returns:
      the value of the color record component
    • whiteSpace

      public WhiteSpaceMode whiteSpace()
      Returns the value of the whiteSpace record component.
      Returns:
      the value of the whiteSpace record component
    • alignment

      public TextAlignment alignment()
      Returns the value of the alignment record component.
      Returns:
      the value of the alignment record component
    • dropShadow

      public boolean dropShadow()
      Returns the value of the dropShadow record component.
      Returns:
      the value of the dropShadow record component