aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/api
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-16 19:13:08 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-16 19:13:08 +0100
commit5ffe5dab3973b540a4e0cd1b57f13d0be77e3f84 (patch)
treedbfdcb73736f5141a0b3843636454968ce3f0a50 /src/main/java/at/hannibal2/skyhanni/api
parentef9313817a53f8b67db959128cc1b73dfacf6d1a (diff)
downloadskyhanni-5ffe5dab3973b540a4e0cd1b57f13d0be77e3f84.tar.gz
skyhanni-5ffe5dab3973b540a4e0cd1b57f13d0be77e3f84.tar.bz2
skyhanni-5ffe5dab3973b540a4e0cd1b57f13d0be77e3f84.zip
Added jacob farming contest features
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/api')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt
index 0a8fc7a80..f86819895 100644
--- a/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt
@@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.events.ProfileJoinEvent
import at.hannibal2.skyhanni.features.bazaar.BazaarApi
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.ItemUtils.name
+import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import java.util.regex.Pattern
@@ -15,6 +16,13 @@ class CollectionAPI {
private val counterPattern = Pattern.compile("(?:.*) §e(.*)§6\\/(?:.*)")
private val singleCounterPattern = Pattern.compile("§7Total Collected: §e(.*)")
+ private val hypixelApiHasWrongItems = listOf(
+ "WOOL",
+ "CORRUPTED_FRAGMENT",
+ "EGG",
+ "POISONOUS_POTATO",
+ )
+
@SubscribeEvent
fun onProfileDataLoad(event: ProfileApiDataLoadedEvent) {
val profileData = event.profileData
@@ -32,12 +40,13 @@ class CollectionAPI {
if (rawName == "GEMSTONE_COLLECTION") {
itemName = "Gemstone"
}
+
// Hypixel moment
- if (rawName == "WOOL" || rawName == "CORRUPTED_FRAGMENT") {
- continue
- }
+ if (hypixelApiHasWrongItems.contains(rawName)) continue
+
if (itemName == null) {
- println("collection name is null for '$rawName'")
+ LorenzUtils.debug("collection name is null for '$rawName'")
+ println()
continue
}
collectionValue[itemName] = counter