Record Class SkyLayerDefinition.Animation
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.api.client.sky.SkyLayerDefinition.Animation
- Record Components:
frameTime- ticks each frame shows for (20 a second)interpolate- cross-fades from each frame into the next instead of cuttingclock-SkyClock.GAME_TIME(the default) orSkyClock.REAL_TIME
- Enclosing class:
- SkyLayerDefinition
public static record SkyLayerDefinition.Animation(int frames, float frameTime, boolean interpolate, SkyClock clock)
extends Record
Plays the texture as a flipbook:
frames images of equal height stacked top to bottom.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SkyLayerDefinition.Animation> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclock()Returns the value of theclockrecord component.final booleanIndicates whether some other object is "equal to" this one.intframes()Returns the value of theframesrecord component.floatReturns the value of theframeTimerecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theinterpolaterecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
Animation
Creates an instance of aAnimationrecord class.- Parameters:
frames- the value for theframesrecord componentframeTime- the value for theframeTimerecord componentinterpolate- the value for theinterpolaterecord componentclock- the value for theclockrecord component
-
-
Method Details
-
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 '=='. -
frames
public int frames()Returns the value of theframesrecord component.- Returns:
- the value of the
framesrecord component
-
frameTime
public float frameTime()Returns the value of theframeTimerecord component.- Returns:
- the value of the
frameTimerecord component
-
interpolate
public boolean interpolate()Returns the value of theinterpolaterecord component.- Returns:
- the value of the
interpolaterecord component
-
clock
Returns the value of theclockrecord component.- Returns:
- the value of the
clockrecord component
-