diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt | 6 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt index 63b32ebb4..3dc13f8d5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt @@ -13,7 +13,7 @@ import at.hannibal2.skyhanni.features.garden.fortuneguide.FFGuideGUI.Companion.c import at.hannibal2.skyhanni.features.garden.fortuneguide.FFGuideGUI.Companion.getItem import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old import at.hannibal2.skyhanni.utils.ItemUtils.getItemName -import at.hannibal2.skyhanni.utils.ItemUtils.getItemRarity +import at.hannibal2.skyhanni.utils.ItemUtils.getItemRarityOrCommon import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.NumberUtil.addSuffix import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getEnchantments @@ -254,7 +254,7 @@ object FortuneUpgrades { } ?: return FarmingFortuneDisplay.loadFortuneLineData(item, 0.0) - val increase = reforge[item.getItemRarity().id + 1, FarmingFortuneDisplay.reforgeFortune] ?: return + val increase = reforge[item.getItemRarityOrCommon().id + 1, FarmingFortuneDisplay.reforgeFortune] ?: return list.add( FortuneUpgrade("§7Recombobulate your ${item.displayName}", null, "RECOMBOBULATOR_3000", 1, increase) ) @@ -267,7 +267,7 @@ object FortuneUpgrades { copperPrice: Int? = null ) { FarmingFortuneDisplay.loadFortuneLineData(item, 0.0) - val increase = reforge[item.getItemRarity().id, FarmingFortuneDisplay.reforgeFortune] ?: return + val increase = reforge[item.getItemRarityOrCommon().id, FarmingFortuneDisplay.reforgeFortune] ?: return list.add( FortuneUpgrade( "§7Reforge your ${item.displayName} §7to ${reforge.reforgeName}", diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt index 25d5f9df4..e1115355f 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt @@ -153,7 +153,7 @@ object ItemUtils { return nbt.getCompoundTag("SkullOwner").getString("Id") } - fun ItemStack.getItemRarity() = getItemRarityOrNull() ?: error("item rarity not detected for item '$name'") + fun ItemStack.getItemRarityOrCommon() = getItemRarityOrNull() ?: LorenzRarity.COMMON fun ItemStack.getItemRarityOrNull(): LorenzRarity? { if (isPet(cleanName())) { |