Record Class SwingAnimation
java.lang.Object
java.lang.Record
fr.fidorial.item.component.SwingAnimation
- Record Components:
type- the kind of swing to playduration- how long the animation runs, in ticks
The animation played when an item is used to attack or interact with something,
able to be specified using
minecraft:attack_animation and minecraft:interact_animation.- Since:
- 0.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe kind of swing an item's attack or interact animation plays. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSwingAnimation(SwingAnimation.SwingAnimationType type, int duration) Creates an instance of aSwingAnimationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
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. -
type
-
duration
-