Package foundry.veil.api.quasar.particle
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
-
Constructor Summary
ConstructorDescriptionSpriteData
(net.minecraft.resources.ResourceLocation sprite, int frameCount, float frameTime, int frameWidth, int frameHeight, boolean stretchToLifetime) Creates an instance of aSpriteData
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.int
Returns the value of theframeCount
record component.int
Returns the value of theframeHeight
record component.float
Returns the value of theframeTime
record component.int
Returns the value of theframeWidth
record component.final int
hashCode()
Returns a hash code value for this object.net.minecraft.resources.ResourceLocation
sprite()
Returns the value of thesprite
record component.boolean
Returns the value of thestretchToLifetime
record component.final String
toString()
Returns a string representation of this record class.float
u
(float renderAge, float agePercent, float u) float
v
(float renderAge, float agePercent, float v)
-
Field Details
-
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 aSpriteData
record class.- Parameters:
sprite
- the value for thesprite
record componentframeCount
- the value for theframeCount
record componentframeTime
- the value for theframeTime
record componentframeWidth
- the value for theframeWidth
record componentframeHeight
- the value for theframeHeight
record componentstretchToLifetime
- the value for thestretchToLifetime
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
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. -
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. -
equals
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 withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
sprite
public net.minecraft.resources.ResourceLocation sprite()Returns the value of thesprite
record component.- Returns:
- the value of the
sprite
record component
-
frameCount
public int frameCount()Returns the value of theframeCount
record component.- Returns:
- the value of the
frameCount
record component
-
frameTime
public float frameTime()Returns the value of theframeTime
record component.- Returns:
- the value of the
frameTime
record component
-
frameWidth
public int frameWidth()Returns the value of theframeWidth
record component.- Returns:
- the value of the
frameWidth
record component
-
frameHeight
public int frameHeight()Returns the value of theframeHeight
record component.- Returns:
- the value of the
frameHeight
record component
-
stretchToLifetime
public boolean stretchToLifetime()Returns the value of thestretchToLifetime
record component.- Returns:
- the value of the
stretchToLifetime
record component
-