Added default effect probability for food
This commit is contained in:
@@ -39,7 +39,7 @@ class FoodComponentHandlerImpl : FoodComponentHandler() {
|
|||||||
val particles = effectConfig.getBoolOrNull("particles") ?: true
|
val particles = effectConfig.getBoolOrNull("particles") ?: true
|
||||||
val icon = effectConfig.getBoolOrNull("icon") ?: true
|
val icon = effectConfig.getBoolOrNull("icon") ?: true
|
||||||
|
|
||||||
val probability = effectConfig.getDouble("probability").toFloat() / 100f
|
val probability = (effectConfig.getDoubleOrNull("probability") ?: 100.0).toFloat() / 100f
|
||||||
|
|
||||||
food.addEffect(
|
food.addEffect(
|
||||||
PotionEffect(
|
PotionEffect(
|
||||||
|
|||||||
@@ -36,3 +36,4 @@ food:
|
|||||||
ambient: true # If the potion is ambient (defaults to true)
|
ambient: true # If the potion is ambient (defaults to true)
|
||||||
particles: true # If the potion has particles (defaults to true)
|
particles: true # If the potion has particles (defaults to true)
|
||||||
icon: true # If the potion icon shows up (defaults to true)
|
icon: true # If the potion icon shows up (defaults to true)
|
||||||
|
probability: 100 # The probability of the potion effect occurring (defaults to 100)
|
||||||
|
|||||||
Reference in New Issue
Block a user