File tree Expand file tree Collapse file tree 2 files changed +44
-12
lines changed
java/at/petrak/hexcasting/api/casting/mishaps
resources/assets/hexcasting/lang Expand file tree Collapse file tree 2 files changed +44
-12
lines changed Original file line number Diff line number Diff line change @@ -25,11 +25,14 @@ class MishapInvalidIota(
2525 }
2626
2727 override fun errorMessage (ctx : CastingEnvironment , errorCtx : Context ): Component ? {
28- val typeStr = HexIotaTypes .REGISTRY .getKey(perpetrator.getType())?.getPath();
29- val typeComp = Component .translatable(" hexcasting.mishap.invalid_value.class.${typeStr} " )
28+ val perpKey = HexIotaTypes .REGISTRY .getKey(perpetrator.getType())
29+ val perpDesc = Component .translatableWithFallback(
30+ " hexcasting.iota.${perpKey} .desc" ,
31+ " hexcasting.mishap.invalid_value.class.${perpKey?.getPath()} "
32+ )
3033 return error(
3134 " invalid_value" , expected, reverseIdx,
32- typeComp , perpetrator.display()
35+ perpDesc , perpetrator.display()
3336 )
3437 }
3538
Original file line number Diff line number Diff line change 960960 escape : "Consideration" ,
961961 undo : "Evanition" ,
962962 } ,
963-
963+
964964 "iota.hexcasting:" : {
965- "null" : "Null" ,
966- double : "Number" ,
967- boolean : "Boolean" ,
968- entity : "Entity" ,
969- list : "List" ,
970- pattern : "Pattern" ,
971- garbage : "Garbage" ,
972- vec3 : "Vector" ,
965+ null : {
966+ "" : "Null" ,
967+ desc : "a null value" ,
968+ } ,
969+ double : {
970+ "" : "Number" ,
971+ desc : "a number" ,
972+ } ,
973+ boolean : {
974+ "" : "Boolean" ,
975+ desc : "a boolean" ,
976+ } ,
977+ entity : {
978+ "" : "Entity" ,
979+ desc : "an entity" ,
980+ } ,
981+ list : {
982+ "" : "List" ,
983+ desc : "a list" ,
984+ } ,
985+ pattern : {
986+ "" : "Pattern" ,
987+ desc : "a pattern" ,
988+ } ,
989+ garbage : {
990+ "" : "Garbage" ,
991+ desc : "garbage" ,
992+ } ,
993+ vec3 : {
994+ "" : "Vector" ,
995+ desc : "a vector" ,
996+ } ,
997+ continution : {
998+ "" : "Continuation" ,
999+ desc : "a jump iota" ,
1000+ } ,
9731001 } ,
9741002
9751003 mishap : {
10261054
10271055 invalid_value : {
10281056 "" : "expected %s at index %s of the stack, but got %s: %s" ,
1057+ no_perp_desc : "expected %s at index %s of the stack, but got %s" ,
10291058
10301059 class : {
10311060 double : "a number" ,
You can’t perform that action at this time.
0 commit comments