makeThrowable

fun makeThrowable(velocity: Double = 1.5, consumeOnThrow: Boolean = true, throwSound: Sound? = Sound.ENTITY_SNOWBALL_THROW, onHit: (ProjectileHitEvent) -> Unit)

Makes this item throwable: right-clicking launches a snowball carrying the item, and onHit runs when it lands. The projectile is identified by the item stored inside it.

Parameters

velocity

speed multiplier along the player's look direction

consumeOnThrow

whether to remove one from the stack on throw

throwSound

sound played on throw, or null for silence

onHit

callback receiving the ProjectileHitEvent of the framework's projectile