diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-09-24 01:16:31 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-23 17:16:31 +0200 |
commit | 2eed7efac2dab7ec54043d188d814b17052cebdd (patch) | |
tree | 118428ce5d5ef9b2c463e9fa3b7ecc93e4913daa /src/main/java/at/hannibal2/skyhanni/features/garden | |
parent | f71458b10781f366d6220b662dba42abe0aa80b3 (diff) | |
download | skyhanni-2eed7efac2dab7ec54043d188d814b17052cebdd.tar.gz skyhanni-2eed7efac2dab7ec54043d188d814b17052cebdd.tar.bz2 skyhanni-2eed7efac2dab7ec54043d188d814b17052cebdd.zip |
Backend: Replace round and roundToPrecision with roundTo (#1931)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/garden')
13 files changed, 33 insertions, 33 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt index 29b92f24a..55898266e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt @@ -17,9 +17,9 @@ import at.hannibal2.skyhanni.utils.CollectionUtils.nextAfter import at.hannibal2.skyhanni.utils.HypixelCommands import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.ItemUtils.getLore -import at.hannibal2.skyhanni.utils.LorenzUtils.round import at.hannibal2.skyhanni.utils.NEUInternalName import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators +import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import at.hannibal2.skyhanni.utils.RegexUtils.groupOrNull import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.RenderUtils.renderRenderables @@ -167,7 +167,7 @@ object FarmingFortuneDisplay { list.add( Renderable.string( "§6Farming Fortune§7: §e" + if (!recentlySwitchedTool && farmingFortune != -1.0) { - farmingFortune.round(0).addSeparators() + farmingFortune.roundTo(0).addSeparators() } else "§7" + (displayCrop.getLatestTrueFarmingFortune()?.addSeparators() ?: "?"), ), ) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt index cdbb07963..ad03a7784 100755 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt @@ -7,7 +7,7 @@ import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LocationUtils import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.LorenzUtils.round +import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import at.hannibal2.skyhanni.utils.RenderUtils.renderStrings import at.hannibal2.skyhanni.utils.SimpleTimeMark import net.minecraft.client.Minecraft @@ -41,8 +41,8 @@ object GardenYawAndPitch { if (!config.showAlways && lastChange.passedSince() > config.timeout.seconds) return - val yawText = yaw.round(config.yawPrecision).toBigDecimal().toPlainString() - val pitchText = pitch.round(config.pitchPrecision).toBigDecimal().toPlainString() + val yawText = yaw.roundTo(config.yawPrecision).toBigDecimal().toPlainString() + val pitchText = pitch.roundTo(config.pitchPrecision).toBigDecimal().toPlainString() val displayList = listOf( "§aYaw: §f$yawText", "§aPitch: §f$pitchText", diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt index aee2a93f4..fa45e579d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt @@ -31,7 +31,6 @@ import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.KeyboardManager import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.addSelector -import at.hannibal2.skyhanni.utils.LorenzUtils.round import at.hannibal2.skyhanni.utils.NEUInternalName import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.NONE import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName @@ -41,6 +40,7 @@ import at.hannibal2.skyhanni.utils.NEUItems.getPrice import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNecessary import at.hannibal2.skyhanni.utils.NumberUtil.shortFormat +import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems import at.hannibal2.skyhanni.utils.SimpleTimeMark @@ -338,10 +338,10 @@ object ComposterOverlay { val multiplier = multiDropFactor * timeMultiplier val multiplierPreview = multiDropFactorPreview * timeMultiplierPreview val compostPerTitlePreview = - if (multiplier != multiplierPreview) " §c➜ §e" + multiplierPreview.round(2) else "" + if (multiplier != multiplierPreview) " §c➜ §e" + multiplierPreview.roundTo(2) else "" val compostPerTitle = if (currentTimeType == TimeType.COMPOST) "Compost multiplier" else "Composts per $timeText" - newList.addAsSingletonList(" §7$compostPerTitle: §e${multiplier.round(2)}$compostPerTitlePreview") + newList.addAsSingletonList(" §7$compostPerTitle: §e${multiplier.roundTo(2)}$compostPerTitlePreview") val organicMatterPrice = getPrice(organicMatterItem) val organicMatterFactor = organicMatterFactors[organicMatterItem]!! diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/FarmingPersonalBestGain.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/FarmingPersonalBestGain.kt index 7d009629b..a2e8a859f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/FarmingPersonalBestGain.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/FarmingPersonalBestGain.kt @@ -6,8 +6,8 @@ import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.DelayedRun -import at.hannibal2.skyhanni.utils.LorenzUtils.round import at.hannibal2.skyhanni.utils.NumberUtil.formatDouble +import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -88,7 +88,7 @@ object FarmingPersonalBestGain { val oldFF = oldCollected / collectionPerFF val ffDiff = newFF - oldFF - ChatUtils.chat("This is §6${ffDiff.round(2)}☘ $crop Fortune §emore than previously!") + ChatUtils.chat("This is §6${ffDiff.roundTo(2)}☘ $crop Fortune §emore than previously!") } fun isEnabled() = GardenAPI.inGarden() && config.contestPersonalBestIncreaseFF diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestFFNeededDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestFFNeededDisplay.kt index 963193c4b..5d9b7f92f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestFFNeededDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestFFNeededDisplay.kt @@ -12,8 +12,8 @@ import at.hannibal2.skyhanni.utils.CollectionUtils.addAsSingletonList import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.LorenzUtils.round import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators +import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems import at.hannibal2.skyhanni.utils.SimpleTimeMark import net.minecraft.item.ItemStack @@ -81,7 +81,7 @@ object JacobContestFFNeededDisplay { addAsSingletonList("§cassuming 19.9 instead.") } else { if (blocksPerSecond < 15.0) { - add(listOf("§7Your latest ", crop.icon, "§7blocks/second: §e${blocksPerSecond.round(2)}")) + add(listOf("§7Your latest ", crop.icon, "§7blocks/second: §e${blocksPerSecond.roundTo(2)}")) add(listOf("§cThis is too low, showing 19.9 Blocks/second instead!")) blocksPerSecond = 19.9 } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestStatsSummary.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestStatsSummary.kt index 3d4fef9a3..144abc0c2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestStatsSummary.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestStatsSummary.kt @@ -6,8 +6,8 @@ import at.hannibal2.skyhanni.events.FarmingContestEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils -import at.hannibal2.skyhanni.utils.LorenzUtils.round import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators +import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.TimeUtils.format import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -41,7 +41,7 @@ object JacobContestStatsSummary { FarmingContestPhase.STOP -> { val duration = startTime.passedSince() - val blocksPerSecond = (blocksBroken.toDouble() / duration.inWholeSeconds).round(2) + val blocksPerSecond = (blocksBroken.toDouble() / duration.inWholeSeconds).roundTo(2) val cropName = event.crop.cropName ChatUtils.chat("Stats for $cropName Contest:") val time = duration.format() diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestTimeNeeded.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestTimeNeeded.kt index 3e99c2683..bb9f9ea21 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestTimeNeeded.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestTimeNeeded.kt @@ -11,8 +11,8 @@ import at.hannibal2.skyhanni.utils.CollectionUtils.addAsSingletonList import at.hannibal2.skyhanni.utils.CollectionUtils.sorted import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.addSelector -import at.hannibal2.skyhanni.utils.LorenzUtils.round import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators +import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems import at.hannibal2.skyhanni.utils.TimeUtils.format import at.hannibal2.skyhanni.utils.renderables.Renderable @@ -102,7 +102,7 @@ object JacobContestTimeNeeded { return } - val speed = (ff * crop.baseDrops * bps / 100).round(1).toInt() + val speed = (ff * crop.baseDrops * bps / 100).roundTo(1).toInt() renderCrop(speed, crop, averages, sorted, map) } @@ -174,7 +174,7 @@ object JacobContestTimeNeeded { add("") val latestFF = crop.getLatestTrueFarmingFortune() ?: 0.0 add("§7Latest FF: §e${(latestFF).addSeparators()}") - val bps = crop.getBps()?.round(1) ?: 0 + val bps = crop.getBps()?.roundTo(1) ?: 0 add("§7${addBpsTitle()}§e${bps.addSeparators()}") addAll(lowBPSWarning) }) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropSpeedMeter.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropSpeedMeter.kt index aa977b65a..74c59674f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropSpeedMeter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropSpeedMeter.kt @@ -9,8 +9,8 @@ import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils -import at.hannibal2.skyhanni.utils.LorenzUtils.round import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators +import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import at.hannibal2.skyhanni.utils.RenderUtils.renderStrings import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -91,7 +91,7 @@ object CropSpeedMeter { currentCrop?.let { val crops = it.getCounter() - startCrops[it]!! val blocks = currentBlocks - val cropsPerBlocks = (crops.toDouble() / blocks.toDouble()).round(3) + val cropsPerBlocks = (crops.toDouble() / blocks.toDouble()).roundTo(3) val list = mutableListOf<String>() list.add("") @@ -101,7 +101,7 @@ object CropSpeedMeter { list.add(" §7Crops per Block: " + cropsPerBlocks.addSeparators()) val baseDrops = it.baseDrops - val farmingFortune = (cropsPerBlocks * 100 / baseDrops).round(3) + val farmingFortune = (cropsPerBlocks * 100 / baseDrops).roundTo(3) list.add(" §7Calculated farming Fortune: §e" + farmingFortune.addSeparators()) list.add("§cOpen /cropmilestones again to recalculate!") diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt index 1fa4b57e6..da461d749 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt @@ -23,8 +23,8 @@ import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.APIUtils import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.LorenzUtils.round import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators +import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import at.hannibal2.skyhanni.utils.OSUtils import at.hannibal2.skyhanni.utils.RenderUtils.renderRenderables import at.hannibal2.skyhanni.utils.SimpleTimeMark @@ -234,7 +234,7 @@ object FarmingWeightDisplay { } val totalWeight = (localWeight + weight) - return "§e" + totalWeight.round(2).addSeparators() + return "§e" + totalWeight.roundTo(2).addSeparators() } private fun getRankGoal(): Int { @@ -326,7 +326,7 @@ object FarmingWeightDisplay { " §7(§b$format§7)" } else "" - val weightFormat = weightUntilOvertake.round(2).addSeparators() + val weightFormat = weightUntilOvertake.roundTo(2).addSeparators() val text = "§e$weightFormat$timeFormat §7behind §b$nextName" return if (showRankGoal) { Renderable.string(text) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt index c37eb41b7..7189199a9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt @@ -26,8 +26,8 @@ import at.hannibal2.skyhanni.utils.CollectionUtils.addString import at.hannibal2.skyhanni.utils.ConditionalUtils import at.hannibal2.skyhanni.utils.ConfigUtils import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.LorenzUtils.round import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators +import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import at.hannibal2.skyhanni.utils.RenderUtils.renderRenderables import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems import at.hannibal2.skyhanni.utils.SimpleTimeMark @@ -187,7 +187,7 @@ object GardenCropMilestoneDisplay { val farmingFortune = FarmingFortuneDisplay.getCurrentFarmingFortune() val speed = GardenCropSpeed.averageBlocksPerSecond - val farmingFortuneSpeed = ((100.0 + farmingFortune) * crop.baseDrops * speed / 100).round(1).toInt() + val farmingFortuneSpeed = ((100.0 + farmingFortune) * crop.baseDrops * speed / 100).roundTo(1).toInt() if (farmingFortuneSpeed > 0) { crop.setSpeed(farmingFortuneSpeed) @@ -219,7 +219,7 @@ object GardenCropMilestoneDisplay { val hourFormat = (farmingFortuneSpeed * 60 * 60).addSeparators() lineMap[MilestoneTextEntry.CROPS_PER_HOUR] = Renderable.string("§7Crops/Hour§8: §e$hourFormat") - val formatBps = speed.round(config.blocksBrokenPrecision).addSeparators() + val formatBps = speed.roundTo(config.blocksBrokenPrecision).addSeparators() lineMap[MilestoneTextEntry.BLOCKS_PER_SECOND] = Renderable.string("§7Blocks/Second§8: §e$formatBps") } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneFeatures.kt index cb63d40de..e407d0ad4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneFeatures.kt @@ -14,8 +14,8 @@ import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LocationUtils import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.LorenzUtils.round import at.hannibal2.skyhanni.utils.LorenzVec +import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText import at.hannibal2.skyhanni.utils.RenderUtils.drawWaypointFilled import at.hannibal2.skyhanni.utils.RenderUtils.renderStrings @@ -76,7 +76,7 @@ object FarmingLaneFeatures { if (config.distanceDisplay) { display = buildList { - add("§7Distance until switch: §e${currentDistance.round(1)}") + add("§7Distance until switch: §e${currentDistance.roundTo(1)}") val normal = movementState == MovementState.NORMAL val color = if (normal) "§b" else "§8" @@ -152,7 +152,7 @@ object FarmingLaneFeatures { private var sameSpeedCounter = 0 private fun calculateSpeed(): Boolean { - val speed = MovementSpeedDisplay.speed.round(2) + val speed = MovementSpeedDisplay.speed.roundTo(2) movementState = calculateMovementState(speed) if (movementState != MovementState.NORMAL) return false diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenCropMilestoneInventory.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenCropMilestoneInventory.kt index 7a2f8d415..e0cb07073 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenCropMilestoneInventory.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenCropMilestoneInventory.kt @@ -12,8 +12,8 @@ import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.indexOfFirst import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.LorenzUtils.round import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators +import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import at.hannibal2.skyhanni.utils.NumberUtil.shortFormat import at.hannibal2.skyhanni.utils.StringUtils import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -35,7 +35,7 @@ object GardenCropMilestoneInventory { val tier = GardenCropMilestones.getTierForCropCount(counter, cropType, allowOverflow) tiers.add(tier.toDouble()) } - average = (tiers.sum() / CropType.entries.size).round(2) + average = (tiers.sum() / CropType.entries.size).roundTo(2) } @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/SkyMartCopperPrice.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/SkyMartCopperPrice.kt index 5ef150907..078ef1672 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/SkyMartCopperPrice.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/SkyMartCopperPrice.kt @@ -12,12 +12,12 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.itemName import at.hannibal2.skyhanni.utils.ItemUtils.loreCosts import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.LorenzUtils.round import at.hannibal2.skyhanni.utils.NEUItems.getPrice import at.hannibal2.skyhanni.utils.NEUItems.getPriceOrNull import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.formatInt import at.hannibal2.skyhanni.utils.NumberUtil.shortFormat +import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.RenderUtils.renderRenderables import at.hannibal2.skyhanni.utils.renderables.Renderable @@ -115,7 +115,7 @@ object SkyMartCopperPrice { event.move(3, "garden.skyMartCopperPriceAdvancedStats", "garden.skyMart.copperPriceAdvancedStats") event.move(3, "garden.skyMartCopperPricePos", "garden.skyMart.copperPricePos") event.transform(32, "garden.skyMart.itemScale") { - JsonPrimitive((it.asDouble / 1.851).round(1)) + JsonPrimitive((it.asDouble / 1.851).roundTo(1)) } } |