diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/Garden.java | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java b/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java index e37f3ecae..1af9cbca1 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java @@ -227,6 +227,7 @@ public class Garden { "§7In §b12m 34s", "§7Crops/Minute§8: §e12,345", "§7Blocks/Second§8: §e20", + "§7Percentage: §e12.34%", } ) @ConfigAccordionId(id = 6) @@ -315,6 +316,7 @@ public class Garden { "§7Mushroom Tier 8", "§e6,700§8/§e15,000", "§7In §b12m 34s", + "§7Percentage: §e12.34%", } ) @ConfigAccordionId(id = 15) 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 0442e4ffe..7145c77d2 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 @@ -312,6 +312,9 @@ class GardenCropMilestoneDisplay { lineMap[5] = Collections.singletonList("§7Blocks/Second§8: §e$lastBlocksPerSecond") } + val percentageFormat = LorenzUtils.formatPercentage(have.toDouble() / need.toDouble()) + lineMap[6] = Collections.singletonList("§7Percentage: §e$percentageFormat") + if (GardenAPI.mushroomCowPet && crop != CropType.MUSHROOM) { if (mushroom_cow_nether_warts && crop == CropType.NETHER_WART) { mushroomCowPerkDisplay = listOf( @@ -377,6 +380,9 @@ class GardenCropMilestoneDisplay { lineMap[2] = Collections.singletonList("§e$haveFormat§8/§e$needFormat") lineMap[3] = Collections.singletonList("§7In §b$duration") + val percentageFormat = LorenzUtils.formatPercentage(have.toDouble() / need.toDouble()) + lineMap[4] = Collections.singletonList("§7Percentage: §e$percentageFormat") + val newList = mutableListOf<List<Any>>() for (index in config.cropMilestoneMushroomPetPerkText) { lineMap[index]?.let { |