fix book on item fix #129
Some checks failed
Java CI with Gradle / build (push) Has been cancelled

This commit is contained in:
alexcrea 2026-08-21 17:06:15 +02:00
parent 74d2e38272
commit 6f36921e36
Signed by: alexcrea
GPG key ID: E59DF23EE2A2266C
2 changed files with 3 additions and 3 deletions

View file

@ -21,7 +21,7 @@ plugins {
}
group = "xyz.alexcrea"
version = "2.1.0"
version = "2.1.1"
val isDevBuild = System.getenv("SMALL_COMMIT_HASH") != null
val isPreRelease = System.getenv("IS_GITHUB_PRERELEASE") == "true"

View file

@ -269,7 +269,7 @@ object AnvilXpUtil {
// We know "enchantment.key in resultEnchs" true
val resultLevel = resultEnchs[enchantment.key]!!
val enchantmentMultiplier = ConfigOptions.enchantmentValue(enchantment.key, isFromBook, isToBook)
val enchantmentMultiplier = ConfigOptions.enchantmentValue(enchantment.key, isToBook, isFromBook)
val value = resultLevel * enchantmentMultiplier
CustomAnvil.log("Value for sacrifice item ${enchantment.key.enchantmentName} level ${enchantment.value} is $value ($resultLevel * $enchantmentMultiplier)")
rightValue += value
@ -283,7 +283,7 @@ object AnvilXpUtil {
val resultLevel = resultEnchs.getOrDefault(enchantment.key, 0)
val enchantmentMultiplier = ConfigOptions.enchantmentValue(enchantment.key, isFromBook, isToBook)
val enchantmentMultiplier = ConfigOptions.enchantmentValue(enchantment.key, isToBook, isFromBook)
val value = resultLevel * enchantmentMultiplier
CustomAnvil.log("Value for left item ${enchantment.key.enchantmentName} level ${enchantment.value} is $value ($resultLevel * $enchantmentMultiplier)")
leftValue += value