diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-08 12:40:20 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-08 12:40:20 +0200 |
commit | 52632ca22713af81d67cbe30a1e306d3fbe19ebb (patch) | |
tree | cadec947dbd54b0d1aa0b3c4cd62b725dcd1573d /src/main/java/at/hannibal2/skyhanni | |
parent | 50710bea90daa9ef159257d5d04e5e9b8ce9ad82 (diff) | |
download | skyhanni-52632ca22713af81d67cbe30a1e306d3fbe19ebb.tar.gz skyhanni-52632ca22713af81d67cbe30a1e306d3fbe19ebb.tar.bz2 skyhanni-52632ca22713af81d67cbe30a1e306d3fbe19ebb.zip |
Highlight the level 100 text in gold for pets below legendary to better indicate that the pet exp bar in the item tooltip is calculating with legendary.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/PetExpTooltip.kt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/PetExpTooltip.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/PetExpTooltip.kt index 3ba76f238..5abc467a1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/PetExpTooltip.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/PetExpTooltip.kt @@ -1,15 +1,13 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.utils.ItemUtils +import at.hannibal2.skyhanni.utils.* +import at.hannibal2.skyhanni.utils.ItemUtils.getItemRarity import at.hannibal2.skyhanni.utils.ItemUtils.name -import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.indexOfFirst import at.hannibal2.skyhanni.utils.LorenzUtils.round -import at.hannibal2.skyhanni.utils.NumberUtil import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getPetExp -import at.hannibal2.skyhanni.utils.StringUtils import net.minecraftforge.event.entity.player.ItemTooltipEvent import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -44,8 +42,10 @@ class PetExpTooltip { event.toolTip.add(index, "§7Total experience: §e${NumberUtil.format(petExperience)}") } else { val progressBar = StringUtils.progressBar(percentage) + val isBelowLEgendary = itemStack.getItemRarity() < LorenzRarity.LEGENDARY + val addLegendaryColor = if (isBelowLEgendary) "§6" else "" event.toolTip.add(index, "$progressBar §e${petExperience.addSeparators()}§6/§e${NumberUtil.format(maxXp)}") - event.toolTip.add(index, "§7Progress to Level $maxLevel: §e$percentageFormat") + event.toolTip.add(index, "§7Progress to ${addLegendaryColor}Level $maxLevel: §e$percentageFormat") } } |