Interface GeyserThrowableComponent
public interface GeyserThrowableComponent
The throwable component allows creating items that can be thrown.
This allows bedrock players to continuously throw an item stack by holding down the use button,
instead of having to use individual presses.
The component also allows specifying whether bedrock clients should display a swing animation when throwing the item. This defaults to true.
- Since:
- 2.9.3
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder for the throwable component. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull GeyserThrowableComponent.Builderbuilder()Creates a new builder for the throwable component.booleanWhether bedrock clients should display a swing animation when throwing the item.static @NonNull GeyserThrowableComponentof(boolean doSwingAnimation) Creates a throwable component with the givendoSwingAnimationvalue.
-
Method Details
-
doSwingAnimation
boolean doSwingAnimation()Whether bedrock clients should display a swing animation when throwing the item. Defaults to true.- Returns:
- true if bedrock clients should display a swing animation when throwing the item
- Since:
- 2.9.3
-
builder
Creates a new builder for the throwable component.- Returns:
- a new builder
- Since:
- 2.9.3
-
of
Creates a throwable component with the givendoSwingAnimationvalue.- Parameters:
doSwingAnimation- whether bedrock clients should display a swing animation when throwing the item- Returns:
- a throwable component
- Since:
- 2.9.3
-