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