Record Class UnihexProvider.Glyph

java.lang.Object
java.lang.Record
net.minecraft.client.gui.font.providers.UnihexProvider.Glyph
All Implemented Interfaces:
GlyphInfo
Enclosing class:
UnihexProvider

static record UnihexProvider.Glyph(UnihexProvider.LineData contents, int left, int right) extends Record implements GlyphInfo
  • Field Details

    • contents

      private final UnihexProvider.LineData contents
      The field for the contents record component.
    • left

      private final int left
      The field for the left record component.
  • Constructor Details

    • Glyph

      Glyph(UnihexProvider.LineData contents, int left, int right)
      Creates an instance of a Glyph record class.
      Parameters:
      contents - the value for the contents record component
      left - the value for the left record component
      right - the value for the right record component
  • Method Details

    • width

      public int width()
    • getAdvance

      public float getAdvance()
      Specified by:
      getAdvance in interface GlyphInfo
    • getShadowOffset

      public float getShadowOffset()
      Specified by:
      getShadowOffset in interface GlyphInfo
    • getBoldOffset

      public float getBoldOffset()
      Specified by:
      getBoldOffset in interface GlyphInfo
    • bake

      public BakedGlyph bake(Function<SheetGlyphInfo,BakedGlyph> p_285377_)
      Specified by:
      bake in interface GlyphInfo
    • 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.
    • contents

      public UnihexProvider.LineData contents()
      Returns the value of the contents record component.
      Returns:
      the value of the contents record component
    • left

      public int left()
      Returns the value of the left record component.
      Returns:
      the value of the left record component
    • right

      public int right()
      Returns the value of the right record component.
      Returns:
      the value of the right record component