From 56ef99497b262c70b6548c38855bd041de1d690f Mon Sep 17 00:00:00 2001 From: calmwolfs Date: Mon, 1 Jan 2024 22:30:13 -0500 Subject: [PATCH] migrate TrevorTracker --- .../skyhanni/features/misc/trevor/TrevorTracker.kt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt index 175d21903ec5..b820f0f7756c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt @@ -10,16 +10,22 @@ import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems +import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.util.regex.Matcher object TrevorTracker { private val config get() = SkyHanniMod.feature.misc.trevorTheTrapper - // TODO USE SH-REPO - private val selfKillMobPattern = - "§aYour mob died randomly, you are rewarded §r§5(?.*) pelts§r§a.".toPattern() - private val killMobPattern = "§aKilling the animal rewarded you §r§5(?.*) pelts§r§a.".toPattern() + private val patternGroup = RepoPattern.group("misc.trevor") + private val selfKillMobPattern by patternGroup.pattern( + "selfkill", + "§aYour mob died randomly, you are rewarded §r§5(?.*) pelts§r§a." + ) + private val killMobPattern by patternGroup.pattern( + "kill", + "§aKilling the animal rewarded you §r§5(?.*) pelts§r§a." + ) private var display = emptyList>()