File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/main/java/gregtech/mixins/mui2 Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 44
55import com .cleanroommc .modularui .drawable .text .BaseKey ;
66import com .cleanroommc .modularui .drawable .text .LangKey ;
7+ import com .llamalad7 .mixinextras .injector .ModifyExpressionValue ;
78import org .spongepowered .asm .mixin .Mixin ;
89import org .spongepowered .asm .mixin .injection .At ;
910import org .spongepowered .asm .mixin .injection .Redirect ;
@@ -16,6 +17,15 @@ public abstract class LangKeyMixin extends BaseKey {
1617 at = @ At (value = "INVOKE" ,
1718 target = "Lnet/minecraft/client/resources/I18n;format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;" ))
1819 public String getTranslateKey (String translateKey , Object [] parameters ) {
19- return LocaleAccessor .getRawKey (translateKey ).replace ("\\ n" , "\n " );
20+ return LocaleAccessor .getRawKey (translateKey )
21+ .replace ("\\ n" , "\n " )
22+ .replace ("/n" , "\n " );
23+ }
24+
25+ @ ModifyExpressionValue (method = "get" ,
26+ at = @ At (value = "INVOKE" ,
27+ target = "Lnet/minecraft/client/resources/I18n;format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;" ))
28+ public String switchNewLines (String original ) {
29+ return original .replace ("/n" , "\n " );
2030 }
2131}
You can’t perform that action at this time.
0 commit comments