Data

data class Data(val item: ItemStack, val chance: (Player?) -> Double, val lootTables: List<LootTables>? = arrayListOf(), val blocks: List<Material>? = arrayListOf(), val entities: List<EntityType>? = arrayListOf(), val amount: (Player?) -> IntRange? = null)

One drop rule.

Constructors

Link copied to clipboard
constructor(item: ItemStack, chance: (Player?) -> Double, lootTables: List<LootTables>? = arrayListOf(), blocks: List<Material>? = arrayListOf(), entities: List<EntityType>? = arrayListOf(), amount: (Player?) -> IntRange? = null)

Properties

Link copied to clipboard
val amount: (Player?) -> IntRange?

optional per-drop stack-size range

Link copied to clipboard
val blocks: List<Material>?

blocks that may drop this item

Link copied to clipboard
val chance: (Player?) -> Double

drop probability in 0.0..1.0, evaluated per player

Link copied to clipboard
val entities: List<EntityType>?

entities that may drop this item

Link copied to clipboard
val item: ItemStack

the stack template to drop (cloned per drop)

Link copied to clipboard
val lootTables: List<LootTables>?

vanilla loot tables this item is injected into