of

@Contract(value = "_, _, _ -> new", pure = true)
fun of(type: DamageType, entity: Entity, indirectEntity: Entity): IndirectEntityDamageSource

Creates a new damage source that causes the given type of damage, and that is caused directly by the given entity, and indirectly by the given indirectEntity.

Return

a new indirect entity damage source

Parameters

type

the type of damage the source will inflict

entity

the entity that directly caused the damage

indirectEntity

the entity that indirectly caused the damage