diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/CropType.kt | 3 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt | 19 |
2 files changed, 15 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/CropType.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/CropType.kt index 423bdaed1..41ef944ea 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/CropType.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/CropType.kt @@ -59,8 +59,7 @@ enum class CropType( Blocks.melon_block -> MELON Blocks.cactus -> CACTUS Blocks.cocoa -> COCOA_BEANS - Blocks.red_mushroom -> MUSHROOM - Blocks.brown_mushroom -> MUSHROOM + Blocks.red_mushroom, Blocks.brown_mushroom -> MUSHROOM Blocks.nether_wart -> NETHER_WART else -> null } 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 6c3bedbf8..adfe0518d 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 @@ -243,14 +243,23 @@ object GardenCropMilestoneDisplay { } private fun addMushroomCowData() { + val mushroom = CropType.MUSHROOM + if (mushroom.isMaxed()) { + mushroomCowPerkDisplay = listOf( + listOf("§6Mooshroom Cow Perk"), + listOf("§eMushroom crop is maxed!"), + ) + return + } + val lineMap = HashMap<Int, List<Any>>() - val counter = CropType.MUSHROOM.getCounter() + val counter = mushroom.getCounter() - val currentTier = GardenCropMilestones.getTierForCropCount(counter, CropType.MUSHROOM) + val currentTier = GardenCropMilestones.getTierForCropCount(counter, mushroom) val nextTier = currentTier + 1 - val cropsForCurrentTier = GardenCropMilestones.getCropsForTier(currentTier, CropType.MUSHROOM) - val cropsForNextTier = GardenCropMilestones.getCropsForTier(nextTier, CropType.MUSHROOM) + val cropsForCurrentTier = GardenCropMilestones.getCropsForTier(currentTier, mushroom) + val cropsForNextTier = GardenCropMilestones.getCropsForTier(nextTier, mushroom) val have = counter - cropsForCurrentTier val need = cropsForNextTier - cropsForCurrentTier @@ -263,7 +272,7 @@ object GardenCropMilestoneDisplay { lineMap[0] = Collections.singletonList("§6Mooshroom Cow Perk") val list = mutableListOf<Any>() - list.addCropIcon(CropType.MUSHROOM) + list.addCropIcon(mushroom) list.add("§7Mushroom Tier $nextTier") lineMap[1] = list |