diff options
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt | 5 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt index 93b84ec48..60a790297 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt @@ -289,7 +289,7 @@ object EstimatedItemValue { } private fun addReforgeStone(stack: ItemStack, list: MutableList<String>): Double { - var rawReforgeName = stack.getReforgeName() ?: return 0.0 + val rawReforgeName = stack.getReforgeName() ?: return 0.0 for ((rawInternalName, values) in Constants.REFORGESTONES.entrySet()) { val stoneJson = values.asJsonObject @@ -302,8 +302,7 @@ object EstimatedItemValue { val reforgeCosts = stoneJson.get("reforgeCosts").asJsonObject val applyCost = getReforgeStoneApplyCost(stack, reforgeCosts, internalName) ?: return 0.0 - val realReforgeName = if (reforgeName.equals("Warped")) "Hyper" else reforgeName - list.add("§7Reforge: §9$realReforgeName") + list.add("§7Reforge: §9$reforgeName") list.add(" §7Stone $reforgeStoneName §7(§6" + NumberUtil.format(reforgeStonePrice) + "§7)") list.add(" §7Apply cost: (§6" + NumberUtil.format(applyCost) + "§7)") return reforgeStonePrice + applyCost diff --git a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt index 0a3478236..4cc248ba3 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt @@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher +import at.hannibal2.skyhanni.utils.StringUtils.removeColor import com.google.gson.JsonObject import net.minecraft.item.Item import net.minecraft.item.ItemStack @@ -145,7 +146,12 @@ object SkyBlockItemModifierUtils { } fun ItemStack.getReforgeName() = getAttributeString("modifier")?.let { - if (it == "pitchin") "pitchin_koi" else it + when { + it == "pitchin" -> "pitchin_koi" + it == "warped" && name!!.removeColor().startsWith("Hyper ") -> "endstone_geode" + + else -> it + } } fun ItemStack.isRecombobulated() = getAttributeBoolean("rarity_upgrades") |