aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-30 13:02:02 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-30 13:02:02 +0100
commit3c19a45821bfe192c9d79b275f4ef514e91c4fdb (patch)
tree364c0bcdbfe127e020ce17cd324b88b6cf3791e4 /src/main/java
parentb49c4b47c2910ab6ae75b62acf9fcc455d1da501 (diff)
downloadskyhanni-3c19a45821bfe192c9d79b275f4ef514e91c4fdb.tar.gz
skyhanni-3c19a45821bfe192c9d79b275f4ef514e91c4fdb.tar.bz2
skyhanni-3c19a45821bfe192c9d79b275f4ef514e91c4fdb.zip
Fixed Mooshroom cow Perk display not showing when maxed.
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/CropType.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt19
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