Record Class BakedGlyph.GlyphInstance

java.lang.Object
java.lang.Record
net.minecraft.client.gui.font.glyphs.BakedGlyph.GlyphInstance
Enclosing class:
BakedGlyph

public static record BakedGlyph.GlyphInstance(float x, float y, int color, int shadowColor, BakedGlyph glyph, Style style, float boldOffset, float shadowOffset) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final float
    The field for the boldOffset record component.
    private final int
    The field for the color record component.
    private final BakedGlyph
    The field for the glyph record component.
    private final int
    The field for the shadowColor record component.
    private final float
    The field for the shadowOffset record component.
    private final Style
    The field for the style record component.
    private final float
    The field for the x record component.
    private final float
    The field for the y record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    GlyphInstance(float x, float y, int color, int shadowColor, BakedGlyph glyph, Style style, float boldOffset, float shadowOffset)
    Creates an instance of a GlyphInstance record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Returns the value of the boldOffset record component.
    int
    Returns the value of the color record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the glyph record component.
    final int
    Returns a hash code value for this object.
    (package private) boolean
     
    int
    Returns the value of the shadowColor record component.
    float
    Returns the value of the shadowOffset record component.
    Returns the value of the style record component.
    final String
    Returns a string representation of this record class.
    float
    x()
    Returns the value of the x record component.
    float
    y()
    Returns the value of the y record component.

    Methods inherited from class java.lang.Object

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

    • x

      private final float x
      The field for the x record component.
    • y

      private final float y
      The field for the y record component.
    • color

      private final int color
      The field for the color record component.
    • shadowColor

      private final int shadowColor
      The field for the shadowColor record component.
    • glyph

      private final BakedGlyph glyph
      The field for the glyph record component.
    • style

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

      private final float boldOffset
      The field for the boldOffset record component.
    • shadowOffset

      private final float shadowOffset
      The field for the shadowOffset record component.
  • Constructor Details

    • GlyphInstance

      public GlyphInstance(float x, float y, int color, int shadowColor, BakedGlyph glyph, Style style, float boldOffset, float shadowOffset)
      Creates an instance of a GlyphInstance record class.
      Parameters:
      x - the value for the x record component
      y - the value for the y record component
      color - the value for the color record component
      shadowColor - the value for the shadowColor record component
      glyph - the value for the glyph record component
      style - the value for the style record component
      boldOffset - the value for the boldOffset record component
      shadowOffset - the value for the shadowOffset record component
  • Method Details

    • hasShadow

      boolean hasShadow()
    • 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.
    • x

      public float x()
      Returns the value of the x record component.
      Returns:
      the value of the x record component
    • y

      public float y()
      Returns the value of the y record component.
      Returns:
      the value of the y record component
    • color

      public int color()
      Returns the value of the color record component.
      Returns:
      the value of the color record component
    • shadowColor

      public int shadowColor()
      Returns the value of the shadowColor record component.
      Returns:
      the value of the shadowColor record component
    • glyph

      public BakedGlyph glyph()
      Returns the value of the glyph record component.
      Returns:
      the value of the glyph record component
    • style

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

      public float boldOffset()
      Returns the value of the boldOffset record component.
      Returns:
      the value of the boldOffset record component
    • shadowOffset

      public float shadowOffset()
      Returns the value of the shadowOffset record component.
      Returns:
      the value of the shadowOffset record component