diff options
author | Empa <42304516+ItsEmpa@users.noreply.github.com> | 2024-04-05 19:08:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-05 19:08:00 +0200 |
commit | 299aa3799b61ccb5fe3cb8975320d9271d853f38 (patch) | |
tree | a0397e6268f47f6d9958920f21c92ee52bcfb9a3 | |
parent | f90096bad0e0210cfba8bc1fe1113ecb296aa6da (diff) | |
download | skyhanni-299aa3799b61ccb5fe3cb8975320d9271d853f38.tar.gz skyhanni-299aa3799b61ccb5fe3cb8975320d9271d853f38.tar.bz2 skyhanni-299aa3799b61ccb5fe3cb8975320d9271d853f38.zip |
Improvement: Kills since last inquis (#1363)
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/diana/MythologicalCreatureTracker.kt | 15 |
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" } } } |