File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
java/at/petrak/hexcasting/api/casting
resources/assets/hexcasting/lang Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ public boolean toleratesOther(Iota that) {
9898 castedName = special .handler ::getName ;
9999 action = special .handler .act ();
100100 } else if (lookup instanceof PatternShapeMatch .Nothing ) {
101- throw new MishapInvalidPattern ();
101+ throw new MishapInvalidPattern (this . getPattern () );
102102 } else throw new IllegalStateException ();
103103
104104 // do the actual calculation!!
Original file line number Diff line number Diff line change @@ -4,10 +4,12 @@ import at.petrak.hexcasting.api.casting.eval.CastingEnvironment
44import at.petrak.hexcasting.api.casting.eval.ResolvedPatternType
55import at.petrak.hexcasting.api.casting.iota.GarbageIota
66import at.petrak.hexcasting.api.casting.iota.Iota
7+ import at.petrak.hexcasting.api.casting.iota.PatternIota
8+ import at.petrak.hexcasting.api.casting.math.HexPattern
79import at.petrak.hexcasting.api.pigment.FrozenPigment
810import net.minecraft.world.item.DyeColor
911
10- class MishapInvalidPattern : Mishap () {
12+ class MishapInvalidPattern ( val pattern : HexPattern ) : Mishap() {
1113 override fun accentColor (ctx : CastingEnvironment , errorCtx : Context ): FrozenPigment =
1214 dyeColor(DyeColor .YELLOW )
1315
@@ -18,5 +20,5 @@ class MishapInvalidPattern : Mishap() {
1820 }
1921
2022 override fun errorMessage (ctx : CastingEnvironment , errorCtx : Context ) =
21- error(" invalid_pattern" )
23+ error(" invalid_pattern" , PatternIota .display(pattern) )
2224}
Original file line number Diff line number Diff line change 975975 mishap : {
976976 "" : "%s: %s" ,
977977
978- invalid_pattern : "That pattern isn't associated with any action" ,
978+ invalid_pattern : "The pattern %s isn't associated with any action" ,
979979 unescaped : "Expected to evaluate a pattern, but evaluated %s instead" ,
980980
981981 not_enough_args : "expected %s or more arguments but the stack was only %s tall" ,
You can’t perform that action at this time.
0 commit comments