version bump and close #190

This commit is contained in:
gamma-delta 2022-07-26 23:16:57 -05:00
parent 33b50f4a82
commit 4d95a57a17
2 changed files with 9 additions and 9 deletions

View file

@ -81,14 +81,6 @@ object PatternRegistry {
*/
@JvmStatic
fun matchPatternAndID(pat: HexPattern, overworld: ServerLevel): Pair<Operator, ResourceLocation> {
// 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()
}

View file

@ -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