Package net.minecraft.client.gui.screens
Class Screen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
- All Implemented Interfaces:
- ContainerEventHandler,- GuiEventListener,- Renderable,- TabOrderedElement
- Direct Known Subclasses:
- AbstractCommandBlockEditScreen,- AbstractContainerScreen,- AbstractReportScreen,- AbstractSignEditScreen,- AccessibilityOnboardingScreen,- AdvancementsScreen,- AlertScreen,- BackupConfirmScreen,- BookEditScreen,- BookViewScreen,- ChatScreen,- ChatSelectionScreen,- ConfirmExperimentalFeaturesScreen,- ConfirmExperimentalFeaturesScreen.DetailsScreen,- ConfirmScreen,- ConnectScreen,- CreateBuffetWorldScreen,- CreateFlatWorldScreen,- CreateWorldScreen,- CreditsAndAttributionScreen,- DatapackLoadFailureScreen,- DeathScreen,- DemoIntroScreen,- DirectJoinServerScreen,- DisconnectedScreen,- EditGameRulesScreen,- EditServerScreen,- EditWorldScreen,- ErrorScreen,- ExperimentsScreen,- GameModeSwitcherScreen,- GenericDirtMessageScreen,- GenericWaitingScreen,- JigsawBlockEditScreen,- JoinMultiplayerScreen,- LevelLoadingScreen,- ModListScreen,- ModMismatchDisconnectedScreen,- NoticeWithLinkScreen,- OptimizeWorldScreen,- OptionsScreen,- OptionsSubScreen,- OutOfMemoryScreen,- PackSelectionScreen,- PauseScreen,- PopupScreen,- PresetFlatWorldScreen,- ProgressScreen,- RealmsScreen,- ReceivingLevelScreen,- ReportPlayerScreen,- ReportReasonSelectionScreen,- SelectWorldScreen,- ServerReconfigScreen,- ShareToLanScreen,- SocialInteractionsScreen,- StatsScreen,- StructureBlockEditScreen,- TelemetryInfoScreen,- TitleScreen,- TitleScreenModUpdateIndicator,- WarningScreen,- WinScreen
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescription(package private) static final recordstatic class
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final ResourceLocationprivate final List<GuiEventListener>private URIprivate Screen.DeferredTooltipRenderingprotected Fontintprivate booleanprivate NarratableEntryprivate static final org.slf4j.Loggerprotected Minecraftprivate final List<NarratableEntry>private static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate final ScreenNarrationCollectorprivate longprivate longfinal List<Renderable>protected final Executorprotected final Componentprivate static final ComponentintFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListenerDOUBLE_CLICK_THRESHOLD_MS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidadded()private voidprotected <T extends Renderable>
 TaddRenderableOnly(T p_254514_) protected <T extends GuiEventListener & Renderable & NarratableEntry>
 TaddRenderableWidget(T p_169406_) protected <T extends GuiEventListener & NarratableEntry>
 TaddWidget(T p_96625_) voidvoidvoidprotected voidchangeFocus(ComponentPath p_265308_) List<? extends GuiEventListener>children()private voidprotected voidprivate voidconfirmLink(boolean p_96623_) createArrowEvent(ScreenDirection p_265049_) findNarratableWidget(List<? extends NarratableEntry> p_169401_, NarratableEntry p_169402_) getTitle()getTooltipFromItem(Minecraft p_281881_, ItemStack p_282833_) protected ComponentbooleanhandleComponentClicked(Style p_96592_) voidstatic booleanstatic booleanstatic booleanprotected static voidhideWidgets(AbstractWidget... p_202377_) protected voidinit()final voidprotected voidinsertText(String p_96587_, boolean p_96588_) static booleanisCopy(int p_96633_) static booleanisCut(int p_96629_) booleanisMouseOver(double p_96595_, double p_96596_) static booleanisPaste(int p_96631_) booleanstatic booleanisSelectAll(int p_96635_) protected booleanisValidCharacterForName(String p_96584_, char p_96585_, int p_96586_) booleankeyPressed(int p_96552_, int p_96553_, int p_96554_) voidvoidonClose()voidonFilesDrop(List<Path> p_96591_) private voidprotected voidvoidremoved()protected voidremoveWidget(GuiEventListener p_169412_) voidrender(GuiGraphics p_281549_, int p_281550_, int p_282878_, float p_282465_) voidrenderBackground(GuiGraphics p_283688_, int p_299421_, int p_298679_, float p_297268_) voidrenderDirtBackground(GuiGraphics p_282281_) voidrenderTransparentBackground(GuiGraphics p_300203_) final voidrenderWithTooltip(GuiGraphics p_282345_, int p_283456_, int p_283586_, float p_282339_) protected voidvoidprivate voidrunNarration(boolean p_169410_) private voidscheduleNarration(long p_169381_, boolean p_169382_) protected voidsetInitialFocus(GuiEventListener p_265756_) voidsetTooltipForNextRenderPass(List<FormattedCharSequence> p_259937_) voidsetTooltipForNextRenderPass(List<FormattedCharSequence> p_262939_, ClientTooltipPositioner p_263078_, boolean p_263107_) voidsetTooltipForNextRenderPass(Tooltip p_262992_, ClientTooltipPositioner p_262980_, boolean p_262988_) protected voidsetTooltipForNextRenderPass(Component p_259986_) booleanprotected booleanprivate booleanprivate voidsuppressNarration(long p_169379_) voidtick()voidtriggerImmediateNarration(boolean p_169408_) protected voidupdateNarratedWidget(NarrationElementOutput p_169403_) protected voidupdateNarrationState(NarrationElementOutput p_169396_) static voidwrapScreenError(Runnable p_96580_, String p_96581_, String p_96582_) Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandlergetFocused, 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.components.events.ContainerEventHandlercharTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, magicalSpecialHackyFocus, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListenermouseMovedMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElementgetTabOrderGroup
- 
Field Details- 
LOGGERprivate static final org.slf4j.Logger LOGGER
- 
ALLOWED_PROTOCOLS
- 
USAGE_NARRATION
- 
BACKGROUND_LOCATION
- 
title
- 
children
- 
narratables
- 
minecraft
- 
initializedprivate boolean initialized
- 
widthpublic int width
- 
heightpublic int height
- 
renderables
- 
font
- 
clickedLink
- 
NARRATE_SUPPRESS_AFTER_INIT_TIMEprivate static final long NARRATE_SUPPRESS_AFTER_INIT_TIME
- 
NARRATE_DELAY_NARRATOR_ENABLEDprivate static final long NARRATE_DELAY_NARRATOR_ENABLED
- 
NARRATE_DELAY_MOUSE_MOVEprivate static final long NARRATE_DELAY_MOUSE_MOVE- See Also:
 
- 
NARRATE_DELAY_MOUSE_ACTIONprivate static final long NARRATE_DELAY_MOUSE_ACTION- See Also:
 
- 
NARRATE_DELAY_KEYBOARD_ACTIONprivate static final long NARRATE_DELAY_KEYBOARD_ACTION- See Also:
 
- 
narrationState
- 
narrationSuppressTimeprivate long narrationSuppressTime
- 
nextNarrationTimeprivate long nextNarrationTime
- 
lastNarratable
- 
deferredTooltipRendering
- 
screenExecutor
 
- 
- 
Constructor Details- 
Screen
 
- 
- 
Method Details- 
getTitle
- 
getNarrationMessage
- 
renderWithTooltippublic final void renderWithTooltip(GuiGraphics p_282345_, int p_283456_, int p_283586_, float p_282339_) 
- 
render- Specified by:
- renderin interface- Renderable
 
- 
keyPressedpublic boolean keyPressed(int p_96552_, int p_96553_, int p_96554_) - Specified by:
- keyPressedin interface- ContainerEventHandler
- Specified by:
- keyPressedin interface- GuiEventListener
 
- 
createTabEvent
- 
setInitialFocus
- 
clearFocusprivate void clearFocus()
- 
changeFocus
- 
shouldCloseOnEscpublic boolean shouldCloseOnEsc()
- 
onClosepublic void onClose()
- 
addRenderableWidgetprotected <T extends GuiEventListener & Renderable & NarratableEntry> T addRenderableWidget(T p_169406_) 
- 
addRenderableOnly
- 
addWidget
- 
removeWidget
- 
clearWidgetsprotected void clearWidgets()
- 
getTooltipFromItem
- 
insertText
- 
handleComponentClicked
- 
init
- 
rebuildWidgetsprotected void rebuildWidgets()
- 
children- Specified by:
- childrenin interface- ContainerEventHandler
 
- 
initprotected void init()
- 
tickpublic void tick()
- 
removedpublic void removed()
- 
addedpublic void added()
- 
renderBackground
- 
renderTransparentBackground
- 
renderDirtBackground
- 
isPauseScreenpublic boolean isPauseScreen()
- 
confirmLinkprivate void confirmLink(boolean p_96623_) 
- 
openLink
- 
hasControlDownpublic static boolean hasControlDown()
- 
hasShiftDownpublic static boolean hasShiftDown()
- 
hasAltDownpublic static boolean hasAltDown()
- 
isCutpublic static boolean isCut(int p_96629_) 
- 
isPastepublic static boolean isPaste(int p_96631_) 
- 
isCopypublic static boolean isCopy(int p_96633_) 
- 
isSelectAllpublic static boolean isSelectAll(int p_96635_) 
- 
repositionElementsprotected void repositionElements()
- 
resize
- 
wrapScreenError
- 
isValidCharacterForName
- 
isMouseOverpublic boolean isMouseOver(double p_96595_, double p_96596_) - Specified by:
- isMouseOverin interface- GuiEventListener
 
- 
onFilesDrop
- 
getMinecraft
- 
scheduleNarrationprivate void scheduleNarration(long p_169381_, boolean p_169382_) 
- 
suppressNarrationprivate void suppressNarration(long p_169379_) 
- 
afterMouseMovepublic void afterMouseMove()
- 
afterMouseActionpublic void afterMouseAction()
- 
afterKeyboardActionpublic void afterKeyboardAction()
- 
shouldRunNarrationprivate boolean shouldRunNarration()
- 
handleDelayedNarrationpublic void handleDelayedNarration()
- 
triggerImmediateNarrationpublic void triggerImmediateNarration(boolean p_169408_) 
- 
runNarrationprivate void runNarration(boolean p_169410_) 
- 
updateNarrationState
- 
updateNarratedWidget
- 
getUsageNarration
- 
findNarratableWidget@Nullable public static Screen.NarratableSearchResult findNarratableWidget(List<? extends NarratableEntry> p_169401_, @Nullable NarratableEntry p_169402_) 
- 
narrationEnabledpublic void narrationEnabled()
- 
setTooltipForNextRenderPass
- 
setTooltipForNextRenderPasspublic void setTooltipForNextRenderPass(List<FormattedCharSequence> p_262939_, ClientTooltipPositioner p_263078_, boolean p_263107_) 
- 
setTooltipForNextRenderPass
- 
setTooltipForNextRenderPasspublic void setTooltipForNextRenderPass(Tooltip p_262992_, ClientTooltipPositioner p_262980_, boolean p_262988_) 
- 
hideWidgets
- 
getRectangle- Specified by:
- getRectanglein interface- GuiEventListener
 
- 
getBackgroundMusic
- 
addEventWidget
 
-