aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-04-19 12:55:32 +0200
committerGitHub <noreply@github.com>2024-04-19 12:55:32 +0200
commitf3b6288fed75eacede95627282cb9bfec73f0c9e (patch)
tree238f4ad71a700236cd3334d33319d9a12348ed58 /src/main/java/at
parentef5e02d12b87e596aa7d808b2c912e91913466d3 (diff)
downloadskyhanni-f3b6288fed75eacede95627282cb9bfec73f0c9e.tar.gz
skyhanni-f3b6288fed75eacede95627282cb9bfec73f0c9e.tar.bz2
skyhanni-f3b6288fed75eacede95627282cb9bfec73f0c9e.zip
Fix: paleontologist in fossil excavator (#1490)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at')
-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)
}
}