diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-06-14 15:48:37 +0200 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-06-14 15:48:37 +0200 |
| commit | a996d8150ef2367e7c839f3565d60bdb68d2125d (patch) | |
| tree | 4da38c50d07b3e2cfa0352694d254225a715715e /src/main/java/at/hannibal2/skyhanni/features/mining | |
| parent | 9f55fd15544e187491d78e2c5ecf2f2ed8ac76f1 (diff) | |
| download | skyhanni-a996d8150ef2367e7c839f3565d60bdb68d2125d.tar.gz skyhanni-a996d8150ef2367e7c839f3565d60bdb68d2125d.tar.bz2 skyhanni-a996d8150ef2367e7c839f3565d60bdb68d2125d.zip | |
Revert "creating and using Number.format()"
This reverts commit 9f55fd15544e187491d78e2c5ecf2f2ed8ac76f1.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/mining')
4 files changed, 16 insertions, 16 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/ExcavatorProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/ExcavatorProfitTracker.kt index 358f79efa..fb6e9054a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/ExcavatorProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/ExcavatorProfitTracker.kt @@ -13,8 +13,8 @@ import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.NEUInternalName import at.hannibal2.skyhanni.utils.NEUItems.getPrice +import at.hannibal2.skyhanni.utils.NumberUtil import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators -import at.hannibal2.skyhanni.utils.NumberUtil.format import at.hannibal2.skyhanni.utils.StringUtils import at.hannibal2.skyhanni.utils.renderables.Renderable import at.hannibal2.skyhanni.utils.tracker.ItemTrackerData @@ -105,13 +105,13 @@ object ExcavatorProfitTracker { val fossilDustPrice = pricePer * fossilDustGained addAsSingletonList( Renderable.hoverTips( - "§7${fossilDustGained.format()}x §fFossil Dust§7: §6${fossilDustPrice.format()}", + "§7${NumberUtil.format(fossilDustGained)}x §fFossil Dust§7: §6${NumberUtil.format(fossilDustPrice)}", listOf( - "§7You gained §6${fossilDustPrice.format()} coins §7in total", + "§7You gained §6${NumberUtil.format(fossilDustPrice)} coins §7in total", "§7for all §e$fossilDustGained §fFossil Dust", "§7you have collected.", "", - "§7Price Per Fossil Dust: §6${pricePer.format()}" + "§7Price Per Fossil Dust: §6${NumberUtil.format(pricePer)}" ) ) ) @@ -142,9 +142,9 @@ object ExcavatorProfitTracker { val name = StringUtils.pluralize(timesExcavated.toInt(), scrapItem.itemName) addAsSingletonList( Renderable.hoverTips( - "$name §7price: §c-${scrapPrice.format()}", + "$name §7price: §c-${NumberUtil.format(scrapPrice)}", listOf( - "§7You paid §c${scrapPrice.format()} coins §7in total", + "§7You paid §c${NumberUtil.format(scrapPrice)} coins §7in total", "§7for all §e$timesExcavated $name", "§7you have used." ) diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/GlacitePowderFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/GlacitePowderFeatures.kt index 2884ffb98..161330da5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/GlacitePowderFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/GlacitePowderFeatures.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.RenderItemTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.cleanName -import at.hannibal2.skyhanni.utils.NumberUtil.format +import at.hannibal2.skyhanni.utils.NumberUtil import at.hannibal2.skyhanni.utils.NumberUtil.formatLong import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern @@ -27,7 +27,7 @@ object GlacitePowderFeatures { glacitePowderPattern.matchMatcher(event.stack.cleanName()) { val powder = group("amount").formatLong() - event.stackTip = "§b${powder.format()}" + event.stackTip = "§b${NumberUtil.format(powder)}" } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/ProfitPerExcavation.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/ProfitPerExcavation.kt index 4ad79da5c..ee2b5fab2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/ProfitPerExcavation.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/ProfitPerExcavation.kt @@ -8,8 +8,8 @@ import at.hannibal2.skyhanni.utils.CollectionUtils.sortedDesc import at.hannibal2.skyhanni.utils.ItemUtils.itemName import at.hannibal2.skyhanni.utils.NEUInternalName import at.hannibal2.skyhanni.utils.NEUItems.getPrice +import at.hannibal2.skyhanni.utils.NumberUtil import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators -import at.hannibal2.skyhanni.utils.NumberUtil.format import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @SkyHanniModule @@ -29,7 +29,7 @@ object ProfitPerExcavation { val pricePer = it.getPrice() if (pricePer == -1.0) continue val profit = amount * pricePer - val text = "§eFound $name §8${amount.addSeparators()}x §7(§6${profit.format()}§7)" + val text = "§eFound $name §8${amount.addSeparators()}x §7(§6${NumberUtil.format(profit)}§7)" map[text] = profit totalProfit += profit } @@ -38,12 +38,12 @@ object ProfitPerExcavation { val scrapItem = FossilExcavatorAPI.scrapItem val scrapPrice = scrapItem.getPrice() - map["${scrapItem.itemName}: §c-${scrapPrice.format()}"] = -scrapPrice + map["${scrapItem.itemName}: §c-${NumberUtil.format(scrapPrice)}"] = -scrapPrice totalProfit -= scrapPrice val hover = map.sortedDesc().keys.toMutableList() val profitPrefix = if (totalProfit < 0) "§c" else "§6" - val totalMessage = "Profit this excavation: $profitPrefix${totalProfit.format()}" + val totalMessage = "Profit this excavation: $profitPrefix${NumberUtil.format(totalProfit)}" hover.add("") hover.add("§e$totalMessage") ChatUtils.hoverableChat(totalMessage, hover) diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/mineshaft/MineshaftCorpseProfitPer.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/mineshaft/MineshaftCorpseProfitPer.kt index 417a531c0..73771d354 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/mineshaft/MineshaftCorpseProfitPer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/mineshaft/MineshaftCorpseProfitPer.kt @@ -8,8 +8,8 @@ import at.hannibal2.skyhanni.utils.CollectionUtils.sortedDesc import at.hannibal2.skyhanni.utils.ItemUtils.itemName import at.hannibal2.skyhanni.utils.NEUInternalName import at.hannibal2.skyhanni.utils.NEUItems.getPrice +import at.hannibal2.skyhanni.utils.NumberUtil import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators -import at.hannibal2.skyhanni.utils.NumberUtil.format import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @SkyHanniModule @@ -29,7 +29,7 @@ object MineshaftCorpseProfitPer { val pricePer = it.getPrice() if (pricePer == -1.0) continue val profit = amount * pricePer - val text = "§eFound $name §8${amount.addSeparators()}x §7(§6${profit.format()}§7)" + val text = "§eFound $name §8${amount.addSeparators()}x §7(§6${NumberUtil.format(profit)}§7)" map[text] = profit totalProfit += profit } @@ -42,13 +42,13 @@ object MineshaftCorpseProfitPer { val keyName = it.itemName val price = it.getPrice() - map["$keyName: §c-${price.format()}"] = -price + map["$keyName: §c-${NumberUtil.format(price)}"] = -price totalProfit -= price } val hover = map.sortedDesc().keys.toMutableList() val profitPrefix = if (totalProfit < 0) "§c" else "§6" - val totalMessage = "Profit for $name Corpse§e: $profitPrefix${totalProfit.format()}" + val totalMessage = "Profit for $name Corpse§e: $profitPrefix${NumberUtil.format(totalProfit)}" hover.add("") hover.add("§e$totalMessage") ChatUtils.hoverableChat(totalMessage, hover) |
