Record Class PixelIcon

java.lang.Object
java.lang.Record
net.ixdarklord.folios.internal.client.paint.PixelIcon

public record PixelIcon(net.minecraft.resources.Identifier texture, int width, int height, int frames) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    PixelIcon(net.minecraft.resources.Identifier texture, int width, int height, int frames)
    Creates an instance of a PixelIcon record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    draw(FoliosPainter painter, int x, int y, int color)
     
    void
    draw(FoliosPainter painter, int x, int y, int frame, int color)
     
    void
    draw(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int x, int y, int color)
     
    void
    draw(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int x, int y, int frame, int color)
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the frames record component.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the height record component.
    static PixelIcon
    of(String name, int width, int height)
     
    static PixelIcon
    of(String name, int width, int height, int frames)
     
    void
    rainbow(FoliosPainter painter, int x, int y, float seconds, int base)
     
    void
    rainbow(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int x, int y, float seconds, int base)
     
    int
    sweepFrame(float seconds, float period, float length)
     
    net.minecraft.resources.Identifier
    Returns the value of the texture record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the width record component.

    Methods inherited from class Object

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

    • PixelIcon

      public PixelIcon(net.minecraft.resources.Identifier texture, int width, int height, int frames)
      Creates an instance of a PixelIcon record class.
      Parameters:
      texture - the value for the texture record component
      width - the value for the width record component
      height - the value for the height record component
      frames - the value for the frames record component
  • Method Details

    • of

      public static PixelIcon of(String name, int width, int height)
    • of

      public static PixelIcon of(String name, int width, int height, int frames)
    • draw

      public void draw(FoliosPainter painter, int x, int y, int color)
    • draw

      public void draw(FoliosPainter painter, int x, int y, int frame, int color)
    • draw

      public void draw(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int x, int y, int color)
    • draw

      public void draw(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int x, int y, int frame, int color)
    • rainbow

      public void rainbow(FoliosPainter painter, int x, int y, float seconds, int base)
    • rainbow

      public void rainbow(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int x, int y, float seconds, int base)
    • sweepFrame

      public int sweepFrame(float seconds, float period, float length)
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • texture

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

      public int width()
      Returns the value of the width record component.
      Returns:
      the value of the width record component
    • height

      public int height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component
    • frames

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