@@ -63,7 +63,7 @@ protected void init() {
6363 detailedMod = ModManager .getModProvider ().getMod (summarizedMod .id ());
6464 } catch (Exception e ) {
6565 e .printStackTrace ();
66- Objects .requireNonNull (this .client ).openScreen (new ModManagerErrorScreen (this , e ));
66+ Objects .requireNonNull (this .client ).setScreen (new ModManagerErrorScreen (this , e ));
6767 }
6868 int buttonX = this .width / 8 ;
6969 String text = detailedMod .body ();
@@ -72,7 +72,7 @@ protected void init() {
7272 }
7373 this .descriptionWidget = this .addSelectableChild (new DescriptionWidget (client , this .width - 20 , this .height - 34 , 79 , this .height - 30 , textRenderer .fontHeight , text ));
7474 this .descriptionWidget .setLeftPos (10 );
75- this .addDrawableChild (new ButtonWidget (buttonX , this .height - 28 , 150 , 20 , ScreenTexts .BACK , button -> Objects .requireNonNull (client ).openScreen (previousScreen )));
75+ this .addDrawableChild (new ButtonWidget (buttonX , this .height - 28 , 150 , 20 , ScreenTexts .BACK , button -> Objects .requireNonNull (client ).setScreen (previousScreen )));
7676
7777 this .actionButton = this .addDrawableChild (new ButtonWidget (this .width - buttonX - 150 , this .height - 28 , 150 , 20 , new TranslatableText ("modmanager.message.install" ),
7878 this ::handleActionClick ));
@@ -82,7 +82,7 @@ protected void init() {
8282 private void handleActionClick (ButtonWidget buttonWidget ) {
8383 if (exception != null ) {
8484 buttonWidget .active = true ;
85- MinecraftClient .getInstance ().openScreen (new ModManagerErrorScreen (this , exception ));
85+ MinecraftClient .getInstance ().setScreen (new ModManagerErrorScreen (this , exception ));
8686 return ;
8787 }
8888 buttonWidget .active = false ;
@@ -179,6 +179,6 @@ public boolean shouldCloseOnEsc() {
179179
180180 @ Override
181181 public void onClose () {
182- Objects .requireNonNull (this .client ).openScreen (previousScreen );
182+ Objects .requireNonNull (this .client ).setScreen (previousScreen );
183183 }
184184}
0 commit comments