Interface JavaSwingAnimation
public interface JavaSwingAnimation
The swing animation component is used to specify the swing animation to play when attacking or interacting using the item.
Currently, only the duration property is supported on Bedrock.
- Since:
- 2.9.3
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder for the swing animation component. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull JavaSwingAnimation.Builderbuilder()Creates a builder for the swing animation component.@org.checkerframework.checker.index.qual.Positive intduration()The duration of the swing animation, in ticks.static @NonNull JavaSwingAnimationof(@org.checkerframework.checker.index.qual.Positive int duration) Creates a swing animation component.
-
Method Details
-
duration
@org.checkerframework.checker.index.qual.Positive int duration()The duration of the swing animation, in ticks. Defaults to 6.- Returns:
- the duration of the swing animation, in ticks
- Since:
- 2.9.3
-
builder
Creates a builder for the swing animation component.- Returns:
- a new builder
- Since:
- 2.9.3
-
of
static @NonNull JavaSwingAnimation of(@org.checkerframework.checker.index.qual.Positive int duration) Creates a swing animation component.- Parameters:
duration- the duration of the swing animation, in ticks- Returns:
- the new swing animation component
- Since:
- 2.9.3
-