From 59d47ebac12a31ba327862805ec9fa98a626fe0f Mon Sep 17 00:00:00 2001 From: Alexia Date: Tue, 27 Feb 2024 18:07:29 +0100 Subject: Talbot's Theodolite: Support exact height message. #1068 --- .../at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc') diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt index 8f4e7ddef..d47abd7c1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt @@ -58,6 +58,10 @@ object TrevorFeatures { "below", "The target is around (?.*) blocks below, at a (?.*) degrees angle!" ) + private val talbotPatternAt by patternGroup.pattern( + "at", + "You are at the exact height!", + ) private val locationPattern by patternGroup.pattern( "zone", "Zone: (?.*)" @@ -138,6 +142,11 @@ object TrevorFeatures { val height = group("height").toInt() TrevorSolver.findMobHeight(height, false) } + talbotPatternAt.matchMatcher(formattedMessage) { + val thePlayer = Minecraft.getMinecraft().thePlayer ?: return + val height = thePlayer.posY + TrevorSolver.averageHeight = height + } if (formattedMessage == "[NPC] Trevor: You will have 10 minutes to find the mob from when you accept the task.") { teleportBlock = SimpleTimeMark.now() -- cgit