Companion

object Companion

Functions

Link copied to clipboard

Registers a drop rule.

Link copied to clipboard
fun amountDependencyLuck(baseRange: IntRange, modifier: Int): (Player?) -> IntRange

Amount function that extends baseRange's upper bound by luck * modifier. Feed the result to Data.amount.

Link copied to clipboard
fun chanceDependencyLuck(baseChance: Double, modifier: Double): (Player?) -> Double

Chance function that adds luck * modifier to baseChance, using the held tool's luck (getLuckChance). Feed the result to Data.chance; keep values in 0.0..1.0.

Link copied to clipboard
fun getLuckChance(item: ItemStack?): Int

Fortune level of item, or Looting if it has no Fortune; 0 if neither.