Package net.minecraft.client.gui.screen
Class RunningTaskScreen
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.AbstractParentElement
net.minecraft.client.gui.screen.Screen
net.minecraft.client.gui.screen.RunningTaskScreen
- All Implemented Interfaces:
Drawable,Element,ParentElement
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 ejzintermediary net/minecraft/class_7534named net/minecraft/client/gui/screen/RunningTaskScreen
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screen.Screen
Screen.SelectedElementNarrationData -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ButtonWidgetprivate longprivate Runnableprivate Textprivate @Nullable MultilineTextprivate static final intprivate static final intprivate static final intFields inherited from class net.minecraft.client.gui.screen.Screen
client, height, itemRenderer, passEvents, textRenderer, title, widthFields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTUREFields inherited from interface net.minecraft.client.gui.Element
MAX_DOUBLE_CLICK_INTERVAL -
Constructor Summary
ConstructorsConstructorDescriptionRunningTaskScreen(Text title, Text cancelButtonText, Runnable cancelCallback) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidinit()Called when a screen should be initialized.voidrender(MatrixStack matrices, int mouseX, int mouseY, float delta) private voidvoidsetDisplay(@Nullable Text description, Text buttonText, Runnable buttonCallback) Changes the description, the button text and callback to the provided one.voidsetDisplay(Text buttonText, Runnable buttonCallback) Removes the description and changes the button text and callback to the provided one.booleanChecks whether this screen should be closed when the escape key is pressed.voidtick()Methods inherited from class net.minecraft.client.gui.screen.Screen
addDrawable, addDrawableChild, addElementNarrations, addScreenNarrations, addSelectableChild, applyKeyPressNarratorDelay, applyMouseMoveNarratorDelay, applyMousePressScrollNarratorDelay, applyNarratorModeChangeDelay, children, clearAndInit, clearChildren, filesDragged, findSelectedElementData, getNarratedTitle, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, hide, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, keyPressed, narrateScreenIfNarrationEnabled, remove, removed, renderBackground, renderBackground, renderBackgroundTexture, renderOrderedTooltip, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, renderTooltip, resize, shouldPause, updateNarrator, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocusedMethods inherited from class net.minecraft.client.gui.DrawableHelper
disableScissor, drawCenteredText, drawCenteredText, drawCenteredTextWithShadow, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, drawWithOutline, drawWithShadow, enableScissor, fill, fillGradient, fillGradient, fillGradient, getZOffset, setZOffsetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.Element
mouseMovedMethods inherited from interface net.minecraft.client.gui.ParentElement
changeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
Field Details
-
TITLE_TEXT_Y
private static final int TITLE_TEXT_Y- See Also:
- Mappings:
Namespace Name Mixin selector official aLejz;a:Iintermediary field_39541Lnet/minecraft/class_7534;field_39541:Inamed TITLE_TEXT_YLnet/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 bLejz;b:Iintermediary field_39542Lnet/minecraft/class_7534;field_39542:Inamed DESCRIPTION_TEXT_YLnet/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 cLejz;c:Iintermediary field_39543Lnet/minecraft/class_7534;field_39543:Inamed DESCRIPTION_TEXT_WIDTHLnet/minecraft/client/gui/screen/RunningTaskScreen;DESCRIPTION_TEXT_WIDTH:I
-
cancelButtonText
- Mappings:
Namespace Name Mixin selector official nLejz;n:Lrm;intermediary field_39544Lnet/minecraft/class_7534;field_39544:Lnet/minecraft/class_2561;named cancelButtonTextLnet/minecraft/client/gui/screen/RunningTaskScreen;cancelButtonText:Lnet/minecraft/text/Text;
-
buttonCallback
- Mappings:
Namespace Name Mixin selector official oLejz;o:Ljava/lang/Runnable;intermediary field_39545Lnet/minecraft/class_7534;field_39545:Ljava/lang/Runnable;named buttonCallbackLnet/minecraft/client/gui/screen/RunningTaskScreen;buttonCallback:Ljava/lang/Runnable;
-
description
- Mappings:
Namespace Name Mixin selector official pLejz;p:Lehh;intermediary field_39546Lnet/minecraft/class_7534;field_39546:Lnet/minecraft/class_5489;named descriptionLnet/minecraft/client/gui/screen/RunningTaskScreen;description:Lnet/minecraft/client/font/MultilineText;
-
button
- Mappings:
Namespace Name Mixin selector official qLejz;q:Legu;intermediary field_39547Lnet/minecraft/class_7534;field_39547:Lnet/minecraft/class_4185;named buttonLnet/minecraft/client/gui/screen/RunningTaskScreen;button:Lnet/minecraft/client/gui/widget/ButtonWidget;
-
buttonActivationTime
private long buttonActivationTime- Mappings:
Namespace Name Mixin selector official rLejz;r:Jintermediary field_39548Lnet/minecraft/class_7534;field_39548:Jnamed buttonActivationTimeLnet/minecraft/client/gui/screen/RunningTaskScreen;buttonActivationTime:J
-
-
Constructor Details
-
RunningTaskScreen
- Mappings:
Namespace Name Mixin selector official <init>Lejz;<init>(Lrm;Lrm;Ljava/lang/Runnable;)Vintermediary <init>Lnet/minecraft/class_7534;<init>(Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;Ljava/lang/Runnable;)Vnamed <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.
-
tick
public void tick() -
render
- Specified by:
renderin interfaceDrawable- Overrides:
renderin classScreen- Mappings:
Namespace Name Mixin selector official aLeht;a(Ldzu;IIF)Vintermediary method_25394Lnet/minecraft/class_4068;method_25394(Lnet/minecraft/class_4587;IIF)Vnamed renderLnet/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:
shouldCloseOnEscin classScreen- Mappings:
Namespace Name Mixin selector official af_Lekr;af_()Zintermediary method_25422Lnet/minecraft/class_437;method_25422()Znamed shouldCloseOnEscLnet/minecraft/client/gui/screen/Screen;shouldCloseOnEsc()Z
-
close
public void close() -
setDisplay
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 aLejz;a(Lrm;Ljava/lang/Runnable;)Vintermediary method_44449Lnet/minecraft/class_7534;method_44449(Lnet/minecraft/class_2561;Ljava/lang/Runnable;)Vnamed setDisplayLnet/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 aLejz;a(Lrm;Lrm;Ljava/lang/Runnable;)Vintermediary method_44450Lnet/minecraft/class_7534;method_44450(Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;Ljava/lang/Runnable;)Vnamed setDisplayLnet/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 hLejz;h()Vintermediary method_44448Lnet/minecraft/class_7534;method_44448()Vnamed replaceButtonLnet/minecraft/client/gui/screen/RunningTaskScreen;replaceButton()V
-