aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorDavid Cole <40234707+DavidArthurCole@users.noreply.github.com>2024-09-21 05:08:42 -0400
committerGitHub <noreply@github.com>2024-09-21 11:08:42 +0200
commitf298d65f6b3029474f6695ccf3cb6ac5f0400e42 (patch)
tree2147c1b056c6e94528d7d69261db77898f49af4a /src/main/java/at
parentc9bb5e1a14f558eb5eb8acc7c46d117a2b62ac0d (diff)
downloadskyhanni-f298d65f6b3029474f6695ccf3cb6ac5f0400e42.tar.gz
skyhanni-f298d65f6b3029474f6695ccf3cb6ac5f0400e42.tar.bz2
skyhanni-f298d65f6b3029474f6695ccf3cb6ac5f0400e42.zip
Fix: Glacite Powder being counted as an item in CorpseTracker (#2557)
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseTracker.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/ProfitPerMineshaftCorpse.kt2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseTracker.kt
index f1d23185f..3e81a01a9 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseTracker.kt
@@ -17,6 +17,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.NEUInternalName
import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
import at.hannibal2.skyhanni.utils.NumberUtil.shortFormat
+import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import at.hannibal2.skyhanni.utils.renderables.Renderable
import at.hannibal2.skyhanni.utils.renderables.Searchable
import at.hannibal2.skyhanni.utils.renderables.toSearchable
@@ -65,9 +66,10 @@ object CorpseTracker {
private fun addLootedCorpse(type: CorpseType) = tracker.modify { it.corpsesLooted.addOrPut(type, 1) }
@SubscribeEvent
- fun onCorpseLoot(event: CorpseLootedEvent) {
+ fun onCorpseLooted(event: CorpseLootedEvent) {
addLootedCorpse(event.corpseType)
for ((itemName, amount) in event.loot) {
+ if (itemName.removeColor().trim() == "Glacite Powder") continue
NEUInternalName.fromItemNameOrNull(itemName)?.let { item ->
tracker.modify {
it.addItem(event.corpseType, item, amount)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/ProfitPerMineshaftCorpse.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/ProfitPerMineshaftCorpse.kt
index 7eebeeaab..78f4b07ed 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/ProfitPerMineshaftCorpse.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/ProfitPerMineshaftCorpse.kt
@@ -18,7 +18,7 @@ object ProfitPerMineshaftCorpse {
private val config get() = SkyHanniMod.feature.mining.mineshaft
@SubscribeEvent
- fun onFossilExcavation(event: CorpseLootedEvent) {
+ fun onCorpseLooted(event: CorpseLootedEvent) {
if (!config.profitPerCorpseLoot) return
val loot = event.loot