Package net.minecraft.client.gui.screen
Class TaskScreen
java.lang.Object
net.minecraft.client.gui.AbstractParentElement
net.minecraft.client.gui.screen.Screen
net.minecraft.client.gui.screen.TaskScreen
- All Implemented Interfaces:
- Drawable,- Element,- Navigable,- ParentElement
A screen that is used for indicating that a task is running or has finished
 running (either successfully or unsuccessfully). The screen has an optional
 multi-line description and a button which can be used to close the screen.
 The button can have a cooldown, which disables the button for a while after
 the screen is displayed.
- Mappings:
- Namespace - Name - official - ety- intermediary - net/minecraft/class_7534- named - net/minecraft/client/gui/screen/TaskScreen
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraft.client.gui.screen.ScreenScreen.SelectedElementNarrationData
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate ButtonWidgetThe button to close the screen (potentially with a side effect, such as cancelling a task).private intHow long the button should be disabled after the screen is displayed in ticks.private final Textprivate final RunnableThe callback executed when the button or the Esc key is pressed.private @Nullable MultilineTextprivate static final intprivate static final intprivate static final intFields inherited from class net.minecraft.client.gui.screen.Screenclient, executor, height, OPTIONS_BACKGROUND_TEXTURE, textRenderer, title, widthFields inherited from interface net.minecraft.client.gui.ElementMAX_DOUBLE_CLICK_INTERVAL
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()static TaskScreencreateResultScreen(Text title, Text descriptionText, Text closeButtonText, Runnable closeCallback) Returns a new screen to indicate a task has finished running.static TaskScreencreateRunningScreen(Text title, Text closeButtonText, Runnable closeCallback) Returns a new screen to indicate a task is running.protected voidinit()Called when a screen should be initialized.voidrender(DrawContext context, int mouseX, int mouseY, float delta) booleanChecks whether this screen should be closed when the escape key is pressed.voidtick()Methods inherited from class net.minecraft.client.gui.screen.ScreenaddDrawable, addDrawableChild, addElementNarrations, addScreenNarrations, addSelectableChild, applyKeyPressNarratorDelay, applyMouseMoveNarratorDelay, applyMousePressScrollNarratorDelay, applyNarratorModeChangeDelay, children, clearAndInit, clearChildren, filesDragged, findSelectedElementData, getMusic, getNavigationFocus, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, hasUsageText, hide, init, initTabNavigation, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, keyPressed, narrateScreenIfNarrationEnabled, onDisplayed, remove, removed, renderBackground, renderBackgroundTexture, renderWithTooltip, resize, setInitialFocus, setTooltip, setTooltip, setTooltip, setTooltip, shouldPause, switchFocus, updateNarrator, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.AbstractParentElementgetFocused, isDragging, setDragging, setFocusedMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.ElementmouseMovedMethods inherited from interface net.minecraft.client.gui.navigation.NavigablegetNavigationOrderMethods inherited from interface net.minecraft.client.gui.ParentElementcharTyped, focusOn, getFocusedPath, getNavigationPath, hoveredElement, isFocused, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setFocused
- 
Field Details- 
TITLE_TEXT_Yprivate static final int TITLE_TEXT_Y- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lety;a:I- intermediary - field_39541- Lnet/minecraft/class_7534;field_39541:I- named - TITLE_TEXT_Y- Lnet/minecraft/client/gui/screen/TaskScreen;TITLE_TEXT_Y:I
 
- 
DESCRIPTION_TEXT_Yprivate static final int DESCRIPTION_TEXT_Y- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lety;b:I- intermediary - field_39542- Lnet/minecraft/class_7534;field_39542:I- named - DESCRIPTION_TEXT_Y- Lnet/minecraft/client/gui/screen/TaskScreen;DESCRIPTION_TEXT_Y:I
 
- 
DESCRIPTION_TEXT_WIDTHprivate static final int DESCRIPTION_TEXT_WIDTH- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - c- Lety;c:I- intermediary - field_39543- Lnet/minecraft/class_7534;field_39543:I- named - DESCRIPTION_TEXT_WIDTH- Lnet/minecraft/client/gui/screen/TaskScreen;DESCRIPTION_TEXT_WIDTH:I
 
- 
descriptionText- Mappings:
- Namespace - Name - Mixin selector - official - k- Lety;k:Lsw;- intermediary - field_39745- Lnet/minecraft/class_7534;field_39745:Lnet/minecraft/class_2561;- named - descriptionText- Lnet/minecraft/client/gui/screen/TaskScreen;descriptionText:Lnet/minecraft/text/Text;
 
- 
closeButtonText- Mappings:
- Namespace - Name - Mixin selector - official - l- Lety;l:Lsw;- intermediary - field_39544- Lnet/minecraft/class_7534;field_39544:Lnet/minecraft/class_2561;- named - closeButtonText- Lnet/minecraft/client/gui/screen/TaskScreen;closeButtonText:Lnet/minecraft/text/Text;
 
- 
closeCallbackThe callback executed when the button or the Esc key is pressed. This can have a side effect, such as cancelling a task in progress.- Mappings:
- Namespace - Name - Mixin selector - official - m- Lety;m:Ljava/lang/Runnable;- intermediary - field_39545- Lnet/minecraft/class_7534;field_39545:Ljava/lang/Runnable;- named - closeCallback- Lnet/minecraft/client/gui/screen/TaskScreen;closeCallback:Ljava/lang/Runnable;
 
- 
description- Mappings:
- Namespace - Name - Mixin selector - official - n- Lety;n:Lepz;- intermediary - field_39546- Lnet/minecraft/class_7534;field_39546:Lnet/minecraft/class_5489;- named - description- Lnet/minecraft/client/gui/screen/TaskScreen;description:Lnet/minecraft/client/font/MultilineText;
 
- 
buttonThe button to close the screen (potentially with a side effect, such as cancelling a task).- Mappings:
- Namespace - Name - Mixin selector - official - o- Lety;o:Lepi;- intermediary - field_39547- Lnet/minecraft/class_7534;field_39547:Lnet/minecraft/class_4185;- named - button- Lnet/minecraft/client/gui/screen/TaskScreen;button:Lnet/minecraft/client/gui/widget/ButtonWidget;
 
- 
buttonCooldownprivate int buttonCooldownHow long the button should be disabled after the screen is displayed in ticks. Can be disabled by setting to0.- Mappings:
- Namespace - Name - Mixin selector - official - p- Lety;p:I- intermediary - field_39746- Lnet/minecraft/class_7534;field_39746:I- named - buttonCooldown- Lnet/minecraft/client/gui/screen/TaskScreen;buttonCooldown:I
 
 
- 
- 
Constructor Details- 
TaskScreenprotected TaskScreen(Text title, @Nullable @Nullable Text descriptionText, Text closeButtonText, Runnable closeCallback, int buttonCooldown) - Mappings:
- Namespace - Name - Mixin selector - official - <init>- Lety;<init>(Lsw;Lsw;Lsw;Ljava/lang/Runnable;I)V- intermediary - <init>- Lnet/minecraft/class_7534;<init>(Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;Ljava/lang/Runnable;I)V- named - <init>- Lnet/minecraft/client/gui/screen/TaskScreen;<init>(Lnet/minecraft/text/Text;Lnet/minecraft/text/Text;Lnet/minecraft/text/Text;Ljava/lang/Runnable;I)V
 
 
- 
- 
Method Details- 
createRunningScreenpublic static TaskScreen createRunningScreen(Text title, Text closeButtonText, Runnable closeCallback) Returns a new screen to indicate a task is running.The screen has no description or button cooldown. - Returns:
- a new screen to indicate a task is running
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lety;a(Lsw;Lsw;Ljava/lang/Runnable;)Lety;- intermediary - method_44690- Lnet/minecraft/class_7534;method_44690(Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;Ljava/lang/Runnable;)Lnet/minecraft/class_7534;- named - createRunningScreen- Lnet/minecraft/client/gui/screen/TaskScreen;createRunningScreen(Lnet/minecraft/text/Text;Lnet/minecraft/text/Text;Ljava/lang/Runnable;)Lnet/minecraft/client/gui/screen/TaskScreen;
 
- 
createResultScreenpublic static TaskScreen createResultScreen(Text title, Text descriptionText, Text closeButtonText, Runnable closeCallback) Returns a new screen to indicate a task has finished running.The screen has a button cooldown of 20 ticks (1 second). - Returns:
- a new screen to indicate a task has finished running
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lety;a(Lsw;Lsw;Lsw;Ljava/lang/Runnable;)Lety;- intermediary - method_44691- Lnet/minecraft/class_7534;method_44691(Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;Ljava/lang/Runnable;)Lnet/minecraft/class_7534;- named - createResultScreen- Lnet/minecraft/client/gui/screen/TaskScreen;createResultScreen(Lnet/minecraft/text/Text;Lnet/minecraft/text/Text;Lnet/minecraft/text/Text;Ljava/lang/Runnable;)Lnet/minecraft/client/gui/screen/TaskScreen;
 
- 
initprotected void init()Called when a screen should be initialized.This method is called when this screen is opened or resized. This should call Screen.setInitialFocus(net.minecraft.client.gui.Element)to set the element that is initially focused.
- 
tickpublic void tick()
- 
render- Specified by:
- renderin interface- Drawable
- Overrides:
- renderin class- Screen
- Mappings:
- Namespace - Name - Mixin selector - official - a- Leqh;a(Leox;IIF)V- intermediary - method_25394- Lnet/minecraft/class_4068;method_25394(Lnet/minecraft/class_332;IIF)V- named - render- Lnet/minecraft/client/gui/Drawable;render(Lnet/minecraft/client/gui/DrawContext;IIF)V
 
- 
shouldCloseOnEscpublic boolean shouldCloseOnEsc()Checks whether this screen should be closed when the escape key is pressed.- Overrides:
- shouldCloseOnEscin class- Screen
- Mappings:
- Namespace - Name - Mixin selector - official - av_- Leuq;av_()Z- intermediary - method_25422- Lnet/minecraft/class_437;method_25422()Z- named - shouldCloseOnEsc- Lnet/minecraft/client/gui/screen/Screen;shouldCloseOnEsc()Z
 
- 
closepublic void close()
- 
getNarratedTitle- Overrides:
- getNarratedTitlein class- Screen
- Mappings:
- Namespace - Name - Mixin selector - official - au_- Leuq;au_()Lsw;- intermediary - method_25435- Lnet/minecraft/class_437;method_25435()Lnet/minecraft/class_2561;- named - getNarratedTitle- Lnet/minecraft/client/gui/screen/Screen;getNarratedTitle()Lnet/minecraft/text/Text;
 
 
-