addToLoot

fun addToLoot(dropChance: (Player?) -> Double, lootTables: List<LootTables>?, blocks: List<Material>?, entities: List<EntityType>?, amount: (Player?) -> IntRange? = null)

Makes this item drop from the given sources.

Parameters

dropChance

chance in 0.0..1.0, computed per (nullable) player

lootTables

vanilla loot tables this item may be added to

blocks

blocks that may drop this item when broken

entities

entities that may drop this item when killed

amount

optional stack-size range per drop