aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/MythologicalCreatureTracker.kt15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/MythologicalCreatureTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/MythologicalCreatureTracker.kt
index 5ee7f0f20..6b40b43db 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/MythologicalCreatureTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/MythologicalCreatureTracker.kt
@@ -16,6 +16,7 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import at.hannibal2.skyhanni.utils.tracker.SkyHanniTracker
import at.hannibal2.skyhanni.utils.tracker.TrackerData
import com.google.gson.annotations.Expose
+import net.minecraft.util.ChatComponentText
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import java.util.regex.Pattern
@@ -83,15 +84,15 @@ object MythologicalCreatureTracker {
BurrowAPI.lastBurrowRelatedChatMessage = SimpleTimeMark.now()
tracker.modify {
it.count.addOrPut(creatureType, 1)
+
// TODO migrate to abstract feature in the future
- it.creaturesSinceLastInquisitor = when (creatureType) {
- MythologicalCreatureType.MINOS_INQUISITOR -> 0
- else -> it.creaturesSinceLastInquisitor + 1
- }
- }
- if (config.hideChat) {
- event.blockedReason = "mythological_creature_dug"
+ if (creatureType == MythologicalCreatureType.MINOS_INQUISITOR) {
+ event.chatComponent =
+ ChatComponentText(event.message + " §e(${it.creaturesSinceLastInquisitor})")
+ it.creaturesSinceLastInquisitor = 0
+ } else it.creaturesSinceLastInquisitor++
}
+ if (config.hideChat) event.blockedReason = "mythological_creature_dug"
}
}
}