Interface GeyserChargeable.Builder
- All Superinterfaces:
GenericBuilder<GeyserChargeable>
- Enclosing interface:
GeyserChargeable
Builder for the chargeable component.
- Since:
- 2.9.3
-
Method Summary
Modifier and TypeMethodDescriptionammunition(@NonNull Identifier ammunition) Adds an item that can be used as ammunition, such asminecraft:arrow.build()Creates the chargeable component.chargeOnDraw(boolean chargeOnDraw) Sets whether the item is charged when drawing.maxDrawDuration(@org.checkerframework.checker.index.qual.NonNegative float maxDrawDuration) Sets the maximum draw duration before the item is released.
-
Method Details
-
maxDrawDuration
GeyserChargeable.Builder maxDrawDuration(@org.checkerframework.checker.index.qual.NonNegative float maxDrawDuration) Sets the maximum draw duration before the item is released.- Parameters:
maxDrawDuration- the non-negative maximum charging duration- Returns:
- this builder
- Since:
- 2.9.3
- See Also:
-
chargeOnDraw
Sets whether the item is charged when drawing.- Parameters:
chargeOnDraw- whether drawing charges the item- Returns:
- this builder
- Since:
- 2.9.3
- See Also:
-
ammunition
Adds an item that can be used as ammunition, such asminecraft:arrow. This will throw when trying to add an item that was already added.- Parameters:
ammunition- the Bedrock item identifier of possible ammunition- Returns:
- this builder
- Since:
- 2.9.3
- See Also:
-
build
GeyserChargeable build()Creates the chargeable component.- Specified by:
buildin interfaceGenericBuilder<GeyserChargeable>- Returns:
- the new component
- Since:
- 2.9.3
-