version bump and close #190
This commit is contained in:
parent
33b50f4a82
commit
4d95a57a17
2 changed files with 9 additions and 9 deletions
|
@ -81,14 +81,6 @@ object PatternRegistry {
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun matchPatternAndID(pat: HexPattern, overworld: ServerLevel): Pair<Operator, ResourceLocation> {
|
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?
|
// Is it global?
|
||||||
val sig = pat.anglesSignature()
|
val sig = pat.anglesSignature()
|
||||||
this.regularPatternLookup[sig]?.let {
|
this.regularPatternLookup[sig]?.let {
|
||||||
|
@ -105,6 +97,14 @@ object PatternRegistry {
|
||||||
return op to it.first
|
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()
|
throw MishapInvalidPattern()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ modName=Hex Casting
|
||||||
|
|
||||||
minecraftVersion=1.18.2
|
minecraftVersion=1.18.2
|
||||||
kotlinVersion=1.6.21
|
kotlinVersion=1.6.21
|
||||||
modVersion=0.9.1
|
modVersion=0.9.2
|
||||||
|
|
||||||
paucalVersion=0.4.6
|
paucalVersion=0.4.6
|
||||||
patchouliVersion=69
|
patchouliVersion=69
|
||||||
|
|
Loading…
Reference in a new issue