Interface JavaUseEffects
public interface JavaUseEffects
The use effects component is used to specify how the player behaves when using the item.
Currently, the can_sprint property is not supported on Bedrock.
- Since:
- 2.9.3
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder for the use effects component. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull JavaUseEffects.Builderbuilder()Creates a builder for the use effects component.static @NonNull JavaUseEffectsof(@org.checkerframework.common.value.qual.IntRange(from=0L, to=1L) float speedMultiplier) Creates a use effects component.@org.checkerframework.common.value.qual.IntRange(from=0L, to=1L) floatThe speed multiplier to apply to the player while using the item.
-
Method Details
-
speedMultiplier
@org.checkerframework.common.value.qual.IntRange(from=0L, to=1L) float speedMultiplier()The speed multiplier to apply to the player while using the item. Defaults to 0.2.- Returns:
- the speed multiplier to apply while using the item
- Since:
- 2.9.3
-
builder
Creates a builder for the use effects component.- Returns:
- a new builder
- Since:
- 2.9.3
-
of
static @NonNull JavaUseEffects of(@org.checkerframework.common.value.qual.IntRange(from=0L, to=1L) float speedMultiplier) Creates a use effects component.- Parameters:
speedMultiplier- the speed multiplier to apply while using the item- Returns:
- the new use effects component
- Since:
- 2.9.3
-