mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Fix most issues with xp cost
This commit is contained in:
parent
0bb496938c
commit
87b8738c6e
6 changed files with 94 additions and 79 deletions
|
|
@ -89,16 +89,4 @@ object EnchantmentUtil {
|
|||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the value of a set of enchantments
|
||||
*/
|
||||
fun Map<Enchantment, Int>.calculateValue(
|
||||
fromBook: Boolean
|
||||
) = entries.sumOf { (enchantment, level) ->
|
||||
val enchantmentMultiplier = ConfigOptions.enchantmentValue(enchantment, fromBook)
|
||||
val value = level * enchantmentMultiplier
|
||||
UnsafeEnchants.log("Value for ${enchantment.enchantmentName} is $value")
|
||||
value
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue