aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/FossilExcavatorAPI.kt14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/FossilExcavatorAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/FossilExcavatorAPI.kt
index d2e50bd1c..aef3e865b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/FossilExcavatorAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/FossilExcavatorAPI.kt
@@ -101,10 +101,20 @@ object FossilExcavatorAPI {
inLoot = false
return
}
-
- val pair = itemPattern.matchMatcher(message) {
+ var pair = itemPattern.matchMatcher(message) {
+ /**
+ * TODO fix the bug that readItemAmount produces two different outputs:
+ * §r§fEnchanted Book -> §fEnchanted
+ * §fEnchanted Book §r§8x -> §fEnchanted Book
+ *
+ * also maybe this is no bug, as enchanted book is no real item?
+ */
ItemUtils.readItemAmount(group("item"))
} ?: return
+ // Workaround: If it is a enchanted book, we assume it is a paleontologist I book
+ if (pair.first.let { it == "§fEnchanted" || it == "§fEnchanted Book"}) {
+ pair = "Paleontologist I" to pair.second
+ }
loot.add(pair)
}
}