Record Class TTFFile

java.lang.Object
java.lang.Record
de.luckymcdev.foundryengine.common.font.TTFFile

public record TTFFile(net.minecraft.resources.Identifier id, net.minecraft.resources.Identifier resource, TTFFile.FontVariant variant, short[] glyphRanges) extends Record
  • Field Details

    • DEFAULT_GLYPH_RANGES

      public static final short[] DEFAULT_GLYPH_RANGES
    • GLYPH_RANGES_MINIMAL

      public static final short[] GLYPH_RANGES_MINIMAL
    • JETBRAINS_MONO_LIGHT

      public static final TTFFile JETBRAINS_MONO_LIGHT
    • JETBRAINS_MONO_MEDIUM

      public static final TTFFile JETBRAINS_MONO_MEDIUM
    • JETBRAINS_MONO_SEMIBOLD

      public static final TTFFile JETBRAINS_MONO_SEMIBOLD
    • JETBRAINS_MONO_REGULAR

      public static final TTFFile JETBRAINS_MONO_REGULAR
    • JETBRAINS_MONO_BOLD

      public static final TTFFile JETBRAINS_MONO_BOLD
    • JETBRAINS_MONO_ITALIC

      public static final TTFFile JETBRAINS_MONO_ITALIC
    • JETBRAINS_MONO_BOLD_ITALIC

      public static final TTFFile JETBRAINS_MONO_BOLD_ITALIC
    • JETBRAINS_MONO_NERDFONT_ALL

      public static final TTFFile[] JETBRAINS_MONO_NERDFONT_ALL
    • FALLBACK_JB

      public static final TTFFile FALLBACK_JB
  • Constructor Details

    • TTFFile

      public TTFFile(net.minecraft.resources.Identifier id, net.minecraft.resources.Identifier resource, TTFFile.FontVariant variant, short[] glyphRanges)
      Creates an instance of a TTFFile record class.
      Parameters:
      id - the value for the id record component
      resource - the value for the resource record component
      variant - the value for the variant record component
      glyphRanges - the value for the glyphRanges record component
  • Method Details

    • load

      public byte[] load(net.minecraft.server.packs.resources.ResourceManager resourceManager)
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • id

      public net.minecraft.resources.Identifier id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • resource

      public net.minecraft.resources.Identifier resource()
      Returns the value of the resource record component.
      Returns:
      the value of the resource record component
    • variant

      public TTFFile.FontVariant variant()
      Returns the value of the variant record component.
      Returns:
      the value of the variant record component
    • glyphRanges

      public short[] glyphRanges()
      Returns the value of the glyphRanges record component.
      Returns:
      the value of the glyphRanges record component