From 4d95a57a174e4a4dd178c6d1afbb4a0525b0d6d1 Mon Sep 17 00:00:00 2001 From: gamma-delta <29877714+gamma-delta@users.noreply.github.com> Date: Tue, 26 Jul 2022 23:16:57 -0500 Subject: [PATCH] version bump and close #190 --- .../at/petrak/hexcasting/api/PatternRegistry.kt | 16 ++++++++-------- gradle.properties | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/PatternRegistry.kt b/Common/src/main/java/at/petrak/hexcasting/api/PatternRegistry.kt index a7deae5d..f15cab9b 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/PatternRegistry.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/PatternRegistry.kt @@ -81,14 +81,6 @@ object PatternRegistry { */ @JvmStatic fun matchPatternAndID(pat: HexPattern, overworld: ServerLevel): Pair { - // Pipeline: - // patterns are registered here every time the game boots - // when we try to look - for (handler in specialHandlers) { - val op = handler.handler.handlePattern(pat) - if (op != null) return op to handler.id - } - // Is it global? val sig = pat.anglesSignature() this.regularPatternLookup[sig]?.let { @@ -105,6 +97,14 @@ object PatternRegistry { return op to it.first } + // Lookup a special handler + // Do this last to prevent conflicts with great spells; this has happened a few times with + // create phial hahaha + for (handler in specialHandlers) { + val op = handler.handler.handlePattern(pat) + if (op != null) return op to handler.id + } + throw MishapInvalidPattern() } diff --git a/gradle.properties b/gradle.properties index a7c9bb1d..f4f31874 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ modName=Hex Casting minecraftVersion=1.18.2 kotlinVersion=1.6.21 -modVersion=0.9.1 +modVersion=0.9.2 paucalVersion=0.4.6 patchouliVersion=69