Record Class SpriteData

java.lang.Object
java.lang.Record
foundry.veil.api.quasar.particle.SpriteData

public record SpriteData(net.minecraft.resources.ResourceLocation sprite, int frameCount, float frameTime, int frameWidth, int frameHeight, boolean stretchToLifetime) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<SpriteData>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    SpriteData(net.minecraft.resources.ResourceLocation sprite, int frameCount, float frameTime, int frameWidth, int frameHeight, boolean stretchToLifetime)
    Creates an instance of a SpriteData record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the frameCount record component.
    int
    Returns the value of the frameHeight record component.
    float
    Returns the value of the frameTime record component.
    int
    Returns the value of the frameWidth record component.
    final int
    Returns a hash code value for this object.
    net.minecraft.resources.ResourceLocation
    Returns the value of the sprite record component.
    boolean
    Returns the value of the stretchToLifetime record component.
    final String
    Returns a string representation of this record class.
    float
    u(float renderAge, float agePercent, float u)
     
    float
    v(float renderAge, float agePercent, float v)
     

    Methods inherited from class java.lang.Object

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

    • CODEC

      public static final com.mojang.serialization.Codec<SpriteData> CODEC
  • Constructor Details

    • SpriteData

      public SpriteData(net.minecraft.resources.ResourceLocation sprite, int frameCount, float frameTime, int frameWidth, int frameHeight, boolean stretchToLifetime)
      Creates an instance of a SpriteData record class.
      Parameters:
      sprite - the value for the sprite record component
      frameCount - the value for the frameCount record component
      frameTime - the value for the frameTime record component
      frameWidth - the value for the frameWidth record component
      frameHeight - the value for the frameHeight record component
      stretchToLifetime - the value for the stretchToLifetime record component
  • Method Details

    • u

      public float u(float renderAge, float agePercent, float u)
    • v

      public float v(float renderAge, float agePercent, float v)
    • 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.
    • sprite

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

      public int frameCount()
      Returns the value of the frameCount record component.
      Returns:
      the value of the frameCount record component
    • frameTime

      public float frameTime()
      Returns the value of the frameTime record component.
      Returns:
      the value of the frameTime record component
    • frameWidth

      public int frameWidth()
      Returns the value of the frameWidth record component.
      Returns:
      the value of the frameWidth record component
    • frameHeight

      public int frameHeight()
      Returns the value of the frameHeight record component.
      Returns:
      the value of the frameHeight record component
    • stretchToLifetime

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