Class RunningTaskScreen

All Implemented Interfaces:
Drawable, Element, ParentElement

@Environment(CLIENT) public class RunningTaskScreen extends Screen
A screen that can be displayed while running a certain task. The task can be cancelled, and the display can be changed by calling setDisplay methods after the task succeeded or failed.
Mappings:
Namespace Name
official ejz
intermediary net/minecraft/class_7534
named net/minecraft/client/gui/screen/RunningTaskScreen
  • Field Details

    • TITLE_TEXT_Y

      private static final int TITLE_TEXT_Y
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lejz;a:I
      intermediary field_39541 Lnet/minecraft/class_7534;field_39541:I
      named TITLE_TEXT_Y Lnet/minecraft/client/gui/screen/RunningTaskScreen;TITLE_TEXT_Y:I
    • DESCRIPTION_TEXT_Y

      private static final int DESCRIPTION_TEXT_Y
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Lejz;b:I
      intermediary field_39542 Lnet/minecraft/class_7534;field_39542:I
      named DESCRIPTION_TEXT_Y Lnet/minecraft/client/gui/screen/RunningTaskScreen;DESCRIPTION_TEXT_Y:I
    • DESCRIPTION_TEXT_WIDTH

      private static final int DESCRIPTION_TEXT_WIDTH
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official c Lejz;c:I
      intermediary field_39543 Lnet/minecraft/class_7534;field_39543:I
      named DESCRIPTION_TEXT_WIDTH Lnet/minecraft/client/gui/screen/RunningTaskScreen;DESCRIPTION_TEXT_WIDTH:I
    • cancelButtonText

      private Text cancelButtonText
      Mappings:
      Namespace Name Mixin selector
      official n Lejz;n:Lrm;
      intermediary field_39544 Lnet/minecraft/class_7534;field_39544:Lnet/minecraft/class_2561;
      named cancelButtonText Lnet/minecraft/client/gui/screen/RunningTaskScreen;cancelButtonText:Lnet/minecraft/text/Text;
    • buttonCallback

      private Runnable buttonCallback
      Mappings:
      Namespace Name Mixin selector
      official o Lejz;o:Ljava/lang/Runnable;
      intermediary field_39545 Lnet/minecraft/class_7534;field_39545:Ljava/lang/Runnable;
      named buttonCallback Lnet/minecraft/client/gui/screen/RunningTaskScreen;buttonCallback:Ljava/lang/Runnable;
    • description

      @Nullable private @Nullable MultilineText description
      Mappings:
      Namespace Name Mixin selector
      official p Lejz;p:Lehh;
      intermediary field_39546 Lnet/minecraft/class_7534;field_39546:Lnet/minecraft/class_5489;
      named description Lnet/minecraft/client/gui/screen/RunningTaskScreen;description:Lnet/minecraft/client/font/MultilineText;
    • button

      private ButtonWidget button
      Mappings:
      Namespace Name Mixin selector
      official q Lejz;q:Legu;
      intermediary field_39547 Lnet/minecraft/class_7534;field_39547:Lnet/minecraft/class_4185;
      named button Lnet/minecraft/client/gui/screen/RunningTaskScreen;button:Lnet/minecraft/client/gui/widget/ButtonWidget;
    • buttonActivationTime

      private long buttonActivationTime
      Mappings:
      Namespace Name Mixin selector
      official r Lejz;r:J
      intermediary field_39548 Lnet/minecraft/class_7534;field_39548:J
      named buttonActivationTime Lnet/minecraft/client/gui/screen/RunningTaskScreen;buttonActivationTime:J
  • Constructor Details

    • RunningTaskScreen

      public RunningTaskScreen(Text title, Text cancelButtonText, Runnable cancelCallback)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lejz;<init>(Lrm;Lrm;Ljava/lang/Runnable;)V
      intermediary <init> Lnet/minecraft/class_7534;<init>(Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;Ljava/lang/Runnable;)V
      named <init> Lnet/minecraft/client/gui/screen/RunningTaskScreen;<init>(Lnet/minecraft/text/Text;Lnet/minecraft/text/Text;Ljava/lang/Runnable;)V
  • Method Details

    • init

      protected void init()
      Called when a screen should be initialized.

      This method is called when this screen is opened or resized.

      Overrides:
      init in class Screen
      Mappings:
      Namespace Name Mixin selector
      official b Lekr;b()V
      intermediary method_25426 Lnet/minecraft/class_437;method_25426()V
      named init Lnet/minecraft/client/gui/screen/Screen;init()V
    • tick

      public void tick()
      Overrides:
      tick in class Screen
      Mappings:
      Namespace Name Mixin selector
      official d Lekr;d()V
      intermediary method_25393 Lnet/minecraft/class_437;method_25393()V
      named tick Lnet/minecraft/client/gui/screen/Screen;tick()V
    • render

      public void render(MatrixStack matrices, int mouseX, int mouseY, float delta)
      Specified by:
      render in interface Drawable
      Overrides:
      render in class Screen
      Mappings:
      Namespace Name Mixin selector
      official a Leht;a(Ldzu;IIF)V
      intermediary method_25394 Lnet/minecraft/class_4068;method_25394(Lnet/minecraft/class_4587;IIF)V
      named render Lnet/minecraft/client/gui/Drawable;render(Lnet/minecraft/client/util/math/MatrixStack;IIF)V
    • shouldCloseOnEsc

      public boolean shouldCloseOnEsc()
      Checks whether this screen should be closed when the escape key is pressed.
      Overrides:
      shouldCloseOnEsc in class Screen
      Mappings:
      Namespace Name Mixin selector
      official af_ Lekr;af_()Z
      intermediary method_25422 Lnet/minecraft/class_437;method_25422()Z
      named shouldCloseOnEsc Lnet/minecraft/client/gui/screen/Screen;shouldCloseOnEsc()Z
    • close

      public void close()
      Overrides:
      close in class Screen
      Mappings:
      Namespace Name Mixin selector
      official ag_ Lekr;ag_()V
      intermediary method_25419 Lnet/minecraft/class_437;method_25419()V
      named close Lnet/minecraft/client/gui/screen/Screen;close()V
    • setDisplay

      public void setDisplay(Text buttonText, Runnable buttonCallback)
      Removes the description and changes the button text and callback to the provided one. The button will be deactivated for 1 second after calling this.
      Mappings:
      Namespace Name Mixin selector
      official a Lejz;a(Lrm;Ljava/lang/Runnable;)V
      intermediary method_44449 Lnet/minecraft/class_7534;method_44449(Lnet/minecraft/class_2561;Ljava/lang/Runnable;)V
      named setDisplay Lnet/minecraft/client/gui/screen/RunningTaskScreen;setDisplay(Lnet/minecraft/text/Text;Ljava/lang/Runnable;)V
    • setDisplay

      public void setDisplay(@Nullable @Nullable Text description, Text buttonText, Runnable buttonCallback)
      Changes the description, the button text and callback to the provided one. The new description will be narrated, and the button will be deactivated for 1 second after calling this.
      Mappings:
      Namespace Name Mixin selector
      official a Lejz;a(Lrm;Lrm;Ljava/lang/Runnable;)V
      intermediary method_44450 Lnet/minecraft/class_7534;method_44450(Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;Ljava/lang/Runnable;)V
      named setDisplay Lnet/minecraft/client/gui/screen/RunningTaskScreen;setDisplay(Lnet/minecraft/text/Text;Lnet/minecraft/text/Text;Ljava/lang/Runnable;)V
    • replaceButton

      private void replaceButton()
      Mappings:
      Namespace Name Mixin selector
      official h Lejz;h()V
      intermediary method_44448 Lnet/minecraft/class_7534;method_44448()V
      named replaceButton Lnet/minecraft/client/gui/screen/RunningTaskScreen;replaceButton()V