Data

data class Data(val item: EffectiveItem, val velocity: Double = 1.5, val consumeOnThrow: Boolean = true, val throwSound: Sound? = Sound.ENTITY_SNOWBALL_THROW, val onHit: (ProjectileHitEvent) -> Unit)

Throw configuration for one item.

Constructors

Link copied to clipboard
constructor(item: EffectiveItem, velocity: Double = 1.5, consumeOnThrow: Boolean = true, throwSound: Sound? = Sound.ENTITY_SNOWBALL_THROW, onHit: (ProjectileHitEvent) -> Unit)

Properties

Link copied to clipboard

whether one is removed from the stack per throw

Link copied to clipboard

the item made throwable

Link copied to clipboard
val onHit: (ProjectileHitEvent) -> Unit

callback invoked with the projectile's ProjectileHitEvent

Link copied to clipboard
val throwSound: Sound?

sound played on throw, or null for silence

Link copied to clipboard

speed multiplier along the thrower's look direction