@@ -15,39 +15,28 @@ public abstract class GameMenuScreenMixin extends Screen {
1515 @ ModifyArg (method = "init" , at = @ At (value = "INVOKE" , target = "Lnet/minecraft/client/gui/widget/ButtonWidget;<init>(IIILjava/lang/String;)V" , ordinal = 0 ), index = 1 )
1616 private int titleScreenX (int x , @ Share ("originalX" ) LocalIntRef originalX ) {
1717 originalX .set (x );
18- return Anchiale . buttonLocation == Anchiale . ButtonLocation . REPLACE_SQ ? this . width - 153 - 4 : x ;
18+ return x ;
1919 }
2020
2121 @ ModifyArg (method = "init" , at = @ At (value = "INVOKE" , target = "Lnet/minecraft/client/gui/widget/ButtonWidget;<init>(IIILjava/lang/String;)V" , ordinal = 0 ), index = 2 )
2222 private int titleScreenY (int y , @ Share ("originalY" ) LocalIntRef originalY ) {
2323 originalY .set (y );
24- return Anchiale .buttonLocation == Anchiale .ButtonLocation .REPLACE_SQ ? this .height - 24 : y ;
25- }
26-
27- @ ModifyExpressionValue (method = "init" , at = @ At (value = "NEW" , target = "(IIILjava/lang/String;)Lnet/minecraft/client/gui/widget/ButtonWidget;" , ordinal = 0 ))
28- private ButtonWidget titleScreenWidth (ButtonWidget button ) {
29- if (Anchiale .buttonLocation == Anchiale .ButtonLocation .REPLACE_SQ ) {
30- button .setWidth (150 ); // from fast reset
31- }
32- return button ;
24+ return y ;
3325 }
3426
3527 @ Inject (method = "init" , at = @ At ("TAIL" ))
3628 private void addAnchialeButton (CallbackInfo ci , @ Share ("originalX" ) LocalIntRef originalX , @ Share ("originalY" ) LocalIntRef originalY ) {
3729 int x , y ;
3830 switch (Anchiale .buttonLocation ) {
39- case BOTTOM_RIGHT :
40- x = this .width - 104 ;
41- y = this .height - 24 ;
42- break ;
4331 case CENTER :
4432 x = originalX .get ();
4533 y = originalY .get () + 24 ;
4634 break ;
47- case REPLACE_SQ :
35+ case BOTTOM_RIGHT :
4836 default :
49- x = originalX .get ();
50- y = originalY .get ();
37+ x = this .width - 104 ;
38+ y = this .height - 24 ;
39+ break ;
5140 }
5241 if (this .client .isInSingleplayer ()) {
5342 this .buttons .add (new ButtonWidget (1507 , x , y , Anchiale .buttonLocation == Anchiale .ButtonLocation .BOTTOM_RIGHT ? 100 : 200 , 20 , "Quit to Title" ));
0 commit comments