Skip to content

Commit

Permalink
use repo regex
Browse files Browse the repository at this point in the history
  • Loading branch information
CalMWolfs committed Dec 29, 2023
1 parent bdd5750 commit 76b3249
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ import at.hannibal2.skyhanni.utils.EntityOutlineRenderer
import at.hannibal2.skyhanni.utils.KeyboardManager
import at.hannibal2.skyhanni.utils.MinecraftConsoleFilter.Companion.initLogging
import at.hannibal2.skyhanni.utils.NEUVersionCheck.checkIfNeuIsLoaded
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils
import at.hannibal2.skyhanni.utils.TabListData
import at.hannibal2.skyhanni.utils.repopatterns.RepoPatternManager
import kotlinx.coroutines.CoroutineName
Expand Down Expand Up @@ -420,6 +421,7 @@ class SkyHanniMod {
loadModule(BingoCardReader())
loadModule(GardenBestCropTime())
loadModule(TrackerManager)
loadModule(SkyBlockItemModifierUtils)

// APIs
loadModule(BazaarApi())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import com.google.gson.JsonObject
import net.minecraft.item.Item
import net.minecraft.item.ItemStack
Expand All @@ -17,8 +18,7 @@ import java.util.Locale
object SkyBlockItemModifierUtils {
private val drillPartTypes = listOf("drill_part_upgrade_module", "drill_part_engine", "drill_part_fuel_tank")

// TODO USE SH-REPO
private val petLevelPattern = "(?:§f§f)?§7\\[Lvl (?<level>\\d+)] .*".toPattern()
private val petLevelPattern by RepoPattern.pattern("utils.item.petlevel", "(?:§f§f)?§7\\[Lvl (?<level>\\d+)] .*")

fun ItemStack.getHotPotatoCount() = getAttributeInt("hot_potato_count")

Expand Down

0 comments on commit 76b3249

Please sign in to comment.