File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/main/java/net/wurstclient/mixin Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -28,15 +28,21 @@ public class StatsScreenMixin
2828 target = "Lnet/minecraft/client/gui/widget/DirectionalLayoutWidget;add(Lnet/minecraft/client/gui/widget/Widget;)Lnet/minecraft/client/gui/widget/Widget;" ,
2929 ordinal = 4 ), method = "createButtons()V" )
3030 private <T extends Widget > T onCreateDoneButton (
31- DirectionalLayoutWidget layout , T doneButton , Operation <T > original )
31+ DirectionalLayoutWidget layout , T doneWidget , Operation <T > original )
3232 {
33+ if (!(doneWidget instanceof ButtonWidget doneButton ))
34+ throw new IllegalStateException (
35+ "The done button in the statistics screen somehow isn't a button" );
36+
3337 if (WurstClient .INSTANCE .getOtfs ().disableOtf .shouldHideEnableButton ())
3438 return original .call (layout , doneButton );
3539
40+ doneButton .setWidth (150 );
41+
3642 DirectionalLayoutWidget subLayout =
3743 layout .add (DirectionalLayoutWidget .horizontal ()).spacing (5 );
3844 subLayout .add (ButtonWidget .builder (getButtonText (), this ::toggleWurst )
39- .width (165 ).build ());
45+ .width (150 ).build ());
4046 return original .call (subLayout , doneButton );
4147 }
4248
You can’t perform that action at this time.
0 commit comments