aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorEmpa <42304516+ItsEmpa@users.noreply.github.com>2024-04-05 19:08:00 +0200
committerGitHub <noreply@github.com>2024-04-05 19:08:00 +0200
commit299aa3799b61ccb5fe3cb8975320d9271d853f38 (patch)
treea0397e6268f47f6d9958920f21c92ee52bcfb9a3 /src/main/java
parentf90096bad0e0210cfba8bc1fe1113ecb296aa6da (diff)
downloadskyhanni-299aa3799b61ccb5fe3cb8975320d9271d853f38.tar.gz
skyhanni-299aa3799b61ccb5fe3cb8975320d9271d853f38.tar.bz2
skyhanni-299aa3799b61ccb5fe3cb8975320d9271d853f38.zip
Improvement: Kills since last inquis (#1363)
Diffstat (limited to 'src/main/java')
-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"
}
}
}