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
-
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
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
frames
public int frames()Returns the value of theframesrecord component.- Returns:
- the value of the
framesrecord component
-
frameTime
-
interpolate
public boolean interpolate()Returns the value of theinterpolaterecord component.- Returns:
- the value of the
interpolaterecord component
-
clock
-