Interface JavaConsumable.Builder
- All Superinterfaces:
GenericBuilder<JavaConsumable>
- Enclosing interface:
JavaConsumable
Builder for the consumable component.
- Since:
- 2.9.3
-
Method Summary
Modifier and TypeMethodDescriptionanimation(JavaConsumable.Animation animation) Sets the animation to play when consuming the item.build()Creates the consumable component.consumeSeconds(@org.checkerframework.checker.index.qual.Positive float consumeSeconds) Sets the time in seconds that consumption takes.
-
Method Details
-
consumeSeconds
JavaConsumable.Builder consumeSeconds(@org.checkerframework.checker.index.qual.Positive float consumeSeconds) Sets the time in seconds that consumption takes. This also determines the animation length.- Parameters:
consumeSeconds- the seconds it takes to consume the item- Returns:
- this builder
- Since:
- 2.9.3
- See Also:
-
animation
Sets the animation to play when consuming the item. SeeJavaConsumable.Animationfor more details - some animations do not work correctly.- Parameters:
animation- the animation to play- Returns:
- this builder
- Since:
- 2.9.3
- See Also:
-
build
JavaConsumable build()Creates the consumable component.- Specified by:
buildin interfaceGenericBuilder<JavaConsumable>- Returns:
- the new component
- Since:
- 2.9.3
-