aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorThunderblade73 <85900443+Thunderblade73@users.noreply.github.com>2023-10-26 00:35:20 +0200
committerGitHub <noreply@github.com>2023-10-26 00:35:20 +0200
commitdc0ea5984697dc5f81011eb584fafd717d070070 (patch)
treedf1d217d36b7bca088a9e8c0907d93d4fda9f54d /src/main/java/at
parent0268bdc1a27fe9a037fa4d10fe839d4d24891b5f (diff)
downloadskyhanni-dc0ea5984697dc5f81011eb584fafd717d070070.tar.gz
skyhanni-dc0ea5984697dc5f81011eb584fafd717d070070.tar.bz2
skyhanni-dc0ea5984697dc5f81011eb584fafd717d070070.zip
Fix (but not tested) (#623)
Highlight Commission Mobs: The "Golden Goblin Slayer" Commission should not trigger the "Goblin Slayer" Commission anymore. #623
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/HighlightMiningCommissionMobs.kt7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/HighlightMiningCommissionMobs.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/HighlightMiningCommissionMobs.kt
index 70d105a26..9b46318de 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/HighlightMiningCommissionMobs.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/HighlightMiningCommissionMobs.kt
@@ -12,6 +12,7 @@ import at.hannibal2.skyhanni.utils.EntityUtils
import at.hannibal2.skyhanni.utils.EntityUtils.hasMaxHealth
import at.hannibal2.skyhanni.utils.LorenzColor
import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
+import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import net.minecraft.entity.EntityLivingBase
import net.minecraft.entity.monster.EntityEndermite
import net.minecraft.entity.monster.EntityIronGolem
@@ -29,7 +30,7 @@ class HighlightMiningCommissionMobs {
DWARVEN_GOBLIN_SLAYER("Goblin Slayer", { it.name == "Goblin " }),
STAR_PUNCHER("Star Sentry Puncher", { it.name == "Crystal Sentry" }),
ICE_WALKER("Ice Walker Slayer", { it.name == "Ice Walker" }),
- GOLDEN_GOBLIN("Golden Goblin Slayer", { it.name.contains("Golden Goblin") }), // TODO test
+ GOLDEN_GOBLIN("Golden Goblin Slayer", { it.name.contains("Golden Goblin") }),
// Crystal Hollows
AUTOMATON("Automaton Slayer", { it is EntityIronGolem }),
@@ -63,7 +64,9 @@ class HighlightMiningCommissionMobs {
if (!isEnabled()) return
MobType.entries.filter { type ->
- event.tabList.find { line -> line.contains(type.commissionName) }?.let { !it.endsWith("§aDONE") } ?: false
+ event.tabList.findLast { line -> line.removeColor().trim().startsWith(type.commissionName) }
+ ?.let { !it.endsWith("§aDONE") }
+ ?: false
}.let {
if (it != active) {
active = it