aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/api
diff options
context:
space:
mode:
authorThunderblade73 <85900443+Thunderblade73@users.noreply.github.com>2024-02-10 00:24:52 +0100
committerGitHub <noreply@github.com>2024-02-10 00:24:52 +0100
commit4559e5ff05e19817a21ae49f1c0d8a97d273f6a1 (patch)
treee72dac91d07fc84bea80548c89e13276caa68b81 /src/main/java/at/hannibal2/skyhanni/api
parentd3a7cc4ab970b457b7950489da781539e45e0dce (diff)
downloadskyhanni-4559e5ff05e19817a21ae49f1c0d8a97d273f6a1.tar.gz
skyhanni-4559e5ff05e19817a21ae49f1c0d8a97d273f6a1.tar.bz2
skyhanni-4559e5ff05e19817a21ae49f1c0d8a97d273f6a1.zip
Splitting many utils functions from LorenzUtils up into other classes: ChatUtils, CollectionUtils, ConditionalUtils. And code cleanup #978
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/api')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt
index 3336fcae3..ff744cecd 100644
--- a/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt
@@ -4,10 +4,10 @@ import at.hannibal2.skyhanni.events.CollectionUpdateEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.ItemAddEvent
import at.hannibal2.skyhanni.events.ProfileJoinEvent
+import at.hannibal2.skyhanni.utils.ChatUtils
+import at.hannibal2.skyhanni.utils.CollectionUtils.addOrPut
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.LorenzUtils.addOrPut
import at.hannibal2.skyhanni.utils.NEUInternalName
import at.hannibal2.skyhanni.utils.NEUItems
import at.hannibal2.skyhanni.utils.NEUItems.getItemStackOrNull
@@ -17,6 +17,7 @@ import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class CollectionAPI {
+
// TODO USE SH-REPO
private val counterPattern = ".* §e(?<amount>.*)§6/.*".toPattern()
private val singleCounterPattern = "§7Total Collected: §e(?<amount>.*)".toPattern()
@@ -76,13 +77,14 @@ class CollectionAPI {
// TODO add support for replenish (higher collection than actual items in inv)
if (internalName.getItemStackOrNull() == null) {
- LorenzUtils.debug("CollectionAPI.addFromInventory: item is null for '$internalName'")
+ ChatUtils.debug("CollectionAPI.addFromInventory: item is null for '$internalName'")
return
}
collectionValue.addOrPut(internalName, event.amount.toLong())
}
companion object {
+
// TODO USE SH-REPO
val collectionValue = mutableMapOf<NEUInternalName, Long>()
private val collectionTier0Pattern = "§7Progress to .* I: .*".toPattern()