33import com .cleanroommc .modularui .drawable .text .BaseKey ;
44import com .cleanroommc .modularui .drawable .text .LangKey ;
55import com .llamalad7 .mixinextras .injector .ModifyExpressionValue ;
6- import org .jetbrains .annotations .NotNull ;
76import org .spongepowered .asm .mixin .Mixin ;
8- import org .spongepowered .asm .mixin .Shadow ;
97import org .spongepowered .asm .mixin .injection .At ;
10- import org .spongepowered .asm .mixin .injection .Inject ;
11- import org .spongepowered .asm .mixin .injection .callback .CallbackInfo ;
12-
13- import java .util .function .Supplier ;
148
159// all this mixin does is switch newlines to the expected format
1610@ Mixin (value = LangKey .class , remap = false )
1711public abstract class LangKeyMixin extends BaseKey {
1812
19- @ Shadow
20- private long time ;
21-
2213 @ ModifyExpressionValue (method = "getFormatted" ,
2314 at = @ At (value = "INVOKE" ,
2415 target = "Lcom/cleanroommc/modularui/drawable/text/FontRenderHelper;formatArgs([Ljava/lang/Object;Lcom/cleanroommc/modularui/drawable/text/FormattingState;Ljava/lang/String;Z)Ljava/lang/String;" ))
@@ -34,11 +25,4 @@ public String getTranslateKey(String original) {
3425 public String switchNewLines (String original ) {
3526 return original .replace ("/n" , "\n " );
3627 }
37-
38- @ Inject (method = "<init>(Ljava/util/function/Supplier;Ljava/util/function/Supplier;)V" ,
39- at = @ At (value = "RETURN" ))
40- private void setTimeToNegativeOne (@ NotNull Supplier <String > keySupplier , @ NotNull Supplier <Object []> argsSupplier ,
41- CallbackInfo ci ) {
42- time = -1 ;
43- }
4428}
0 commit comments