Interface CrossbowExtensions
An interface to implement for all custom crossbows in Quilt.
This is meant to be used on a CrossbowItem class.
In order to modify the projectile shot from your crossbow, implementing and registering
CrossbowShotProjectileEvents.ModifyProjectileFromCrossbow is recommended.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault floatgetProjectileSpeed(@NotNull net.minecraft.item.ItemStack stack, @NotNull net.minecraft.component.type.ChargedProjectilesComponent component, @NotNull net.minecraft.entity.LivingEntity entity) Allows modifying the speed of the crossbow projectile.
-
Method Details
-
getProjectileSpeed
default float getProjectileSpeed(@NotNull @NotNull net.minecraft.item.ItemStack stack, @NotNull @NotNull net.minecraft.component.type.ChargedProjectilesComponent component, @NotNull @NotNull net.minecraft.entity.LivingEntity entity) Allows modifying the speed of the crossbow projectile.The default implementation follows the vanilla values for projectiles
- Parameters:
stack- the item stack for the crossbowcomponent- the projectile component for the crossbowentity- the entity shooting the crossbow- Returns:
- the speed of the projectile
-