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
,AbstractTestScreen
,AccessibilityOnboardingScreen
,AdvancementsScreen
,AlertScreen
,BackupConfirmScreen
,BookEditScreen
,BookViewScreen
,ChatScreen
,ChatSelectionScreen
,ConfirmExperimentalFeaturesScreen
,ConfirmExperimentalFeaturesScreen.DetailsScreen
,ConfirmScreen
,ConnectScreen
,CreateBuffetWorldScreen
,CreateFlatWorldScreen
,CreateWorldScreen
,CreditsAndAttributionScreen
,CustomPresetEditorTest.SwampDesertScreen
,CustomTooltipTest.TooltipTestScreen
,DatapackLoadFailureScreen
,DeathScreen
,DemoIntroScreen
,DirectJoinServerScreen
,DisconnectedScreen
,EditGameRulesScreen
,EditServerScreen
,EditWorldScreen
,ErrorScreen
,ExperimentsScreen
,GameModeSwitcherScreen
,GenericMessageScreen
,GenericWaitingScreen
,GuiTests.TestLayer
,JigsawBlockEditScreen
,JoinMultiplayerScreen
,LevelLoadingScreen
,ModListScreen
,ModMismatchDisconnectedScreen
,NoticeWithLinkScreen
,OptimizeWorldScreen
,OptionsScreen
,OptionsSubScreen
,OutOfMemoryScreen
,PackSelectionScreen
,PauseScreen
,PopupScreen
,PresetFlatWorldScreen
,ProgressScreen
,RealmsScreen
,ReceivingLevelScreen
,RecoverWorldDataScreen
,ReportPlayerScreen
,ReportReasonSelectionScreen
,SelectWorldScreen
,ServerReconfigScreen
,ShareToLanScreen
,SocialInteractionsScreen
,StatsScreen
,StructureBlockEditScreen
,TelemetryInfoScreen
,TestScreen
,TitleScreen
,UnsupportedGraphicsWarningScreen
,WarningScreen
,WinScreen
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static final record
static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate final List
<GuiEventListener> private URI
protected static final CubeMap
private Screen.DeferredTooltipRendering
protected Font
static final ResourceLocation
static final ResourceLocation
int
private boolean
static final ResourceLocation
static final ResourceLocation
private static final ResourceLocation
private NarratableEntry
private long
private static final org.slf4j.Logger
static final ResourceLocation
protected Minecraft
private final List
<NarratableEntry> private static final long
private static final long
private static final long
private static final long
private static final long
private final ScreenNarrationCollector
private long
private long
protected static final PanoramaRenderer
final List
<Renderable> protected final Executor
protected final Component
private static final Component
int
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
added()
private void
protected <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_) protected float
void
void
void
protected void
changeFocus
(ComponentPath p_265308_) List
<? extends GuiEventListener> children()
void
protected void
protected void
private void
confirmLink
(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 Component
boolean
handleComponentClicked
(Style p_96592_) void
static boolean
static boolean
static boolean
protected void
init()
final void
protected void
insertText
(String p_96587_, boolean p_96588_) static boolean
isCopy
(int p_96633_) static boolean
isCut
(int p_96629_) boolean
isMouseOver
(double p_96595_, double p_96596_) static boolean
isPaste
(int p_96631_) boolean
static boolean
isSelectAll
(int p_96635_) protected boolean
isValidCharacterForName
(String p_96584_, char p_96585_, int p_96586_) boolean
keyPressed
(int p_96552_, int p_96553_, int p_96554_) void
void
onClose()
void
onFilesDrop
(List<Path> p_96591_) private void
protected void
void
removed()
protected void
removeWidget
(GuiEventListener p_169412_) void
render
(GuiGraphics p_281549_, int p_281550_, int p_282878_, float p_282465_) Neo: mixins targeting this method won't fire for container screens asAbstractContainerScreen.render(net.minecraft.client.gui.GuiGraphics, int, int, float)
replicates this method in place of a super call to insert an eventvoid
renderBackground
(GuiGraphics p_283688_, int p_296369_, int p_296477_, float p_294317_) protected void
renderBlurredBackground
(float p_330683_) protected void
renderMenuBackground
(GuiGraphics p_331074_) protected void
renderMenuBackground
(GuiGraphics p_331077_, int p_331957_, int p_331095_, int p_331894_, int p_332138_) static void
renderMenuBackgroundTexture
(GuiGraphics p_331514_, ResourceLocation p_333918_, int p_330327_, int p_331282_, float p_334038_, float p_334054_, int p_331309_, int p_331449_) protected void
renderPanorama
(GuiGraphics p_331628_, float p_331316_) void
renderTransparentBackground
(GuiGraphics p_294586_) final void
renderWithTooltip
(GuiGraphics p_282345_, int p_283456_, int p_283586_, float p_282339_) protected void
void
private void
runNarration
(boolean p_169410_) private void
scheduleNarration
(long p_169381_, boolean p_169382_) protected void
protected void
setInitialFocus
(GuiEventListener p_265756_) void
setTooltipForNextRenderPass
(List<FormattedCharSequence> p_259937_) void
setTooltipForNextRenderPass
(List<FormattedCharSequence> p_262939_, ClientTooltipPositioner p_263078_, boolean p_263107_) void
setTooltipForNextRenderPass
(Tooltip p_262992_, ClientTooltipPositioner p_262980_, boolean p_262988_) void
setTooltipForNextRenderPass
(Component p_259986_) boolean
protected boolean
private boolean
private void
suppressNarration
(long p_169379_) void
tick()
void
triggerImmediateNarration
(boolean p_169408_) protected void
updateNarratedWidget
(NarrationElementOutput p_169403_) protected void
updateNarrationState
(NarrationElementOutput p_169396_) static void
wrapScreenError
(Runnable p_96580_, String p_96581_, String p_96582_) Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocused
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocused
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved
Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
ALLOWED_PROTOCOLS
-
USAGE_NARRATION
-
CUBE_MAP
-
PANORAMA
-
MENU_BACKGROUND
-
HEADER_SEPARATOR
-
FOOTER_SEPARATOR
-
INWORLD_MENU_BACKGROUND
-
INWORLD_HEADER_SEPARATOR
-
INWORLD_FOOTER_SEPARATOR
-
title
-
children
-
narratables
-
minecraft
-
initialized
private boolean initialized -
width
public int width -
height
public int height -
renderables
-
lastPanoramaRenderTime
private long lastPanoramaRenderTime -
font
-
clickedLink
-
NARRATE_SUPPRESS_AFTER_INIT_TIME
private static final long NARRATE_SUPPRESS_AFTER_INIT_TIME -
NARRATE_DELAY_NARRATOR_ENABLED
private static final long NARRATE_DELAY_NARRATOR_ENABLED -
NARRATE_DELAY_MOUSE_MOVE
private static final long NARRATE_DELAY_MOUSE_MOVE- See Also:
-
NARRATE_DELAY_MOUSE_ACTION
private static final long NARRATE_DELAY_MOUSE_ACTION- See Also:
-
NARRATE_DELAY_KEYBOARD_ACTION
private static final long NARRATE_DELAY_KEYBOARD_ACTION- See Also:
-
narrationState
-
narrationSuppressTime
private long narrationSuppressTime -
nextNarrationTime
private long nextNarrationTime -
lastNarratable
-
deferredTooltipRendering
-
screenExecutor
-
-
Constructor Details
-
Screen
-
-
Method Details
-
getTitle
-
getNarrationMessage
-
renderWithTooltip
public final void renderWithTooltip(GuiGraphics p_282345_, int p_283456_, int p_283586_, float p_282339_) -
render
Neo: mixins targeting this method won't fire for container screens asAbstractContainerScreen.render(net.minecraft.client.gui.GuiGraphics, int, int, float)
replicates this method in place of a super call to insert an event- Specified by:
render
in interfaceRenderable
-
keyPressed
public boolean keyPressed(int p_96552_, int p_96553_, int p_96554_) - Specified by:
keyPressed
in interfaceContainerEventHandler
- Specified by:
keyPressed
in interfaceGuiEventListener
-
createTabEvent
-
setInitialFocus
protected void setInitialFocus() -
setInitialFocus
-
clearFocus
public void clearFocus() -
changeFocus
-
shouldCloseOnEsc
public boolean shouldCloseOnEsc() -
onClose
public void onClose() -
addRenderableWidget
protected <T extends GuiEventListener & Renderable & NarratableEntry> T addRenderableWidget(T p_169406_) -
addRenderableOnly
-
addWidget
-
removeWidget
-
clearWidgets
protected void clearWidgets() -
getTooltipFromItem
-
insertText
-
handleComponentClicked
-
init
-
rebuildWidgets
protected void rebuildWidgets() -
children
- Specified by:
children
in interfaceContainerEventHandler
-
init
protected void init() -
tick
public void tick() -
removed
public void removed() -
added
public void added() -
renderBackground
-
renderBlurredBackground
protected void renderBlurredBackground(float p_330683_) -
advancePanoramaTime
protected float advancePanoramaTime() -
renderPanorama
-
renderMenuBackground
-
renderMenuBackground
protected void renderMenuBackground(GuiGraphics p_331077_, int p_331957_, int p_331095_, int p_331894_, int p_332138_) -
renderMenuBackgroundTexture
public static void renderMenuBackgroundTexture(GuiGraphics p_331514_, ResourceLocation p_333918_, int p_330327_, int p_331282_, float p_334038_, float p_334054_, int p_331309_, int p_331449_) -
renderTransparentBackground
-
isPauseScreen
public boolean isPauseScreen() -
confirmLink
private void confirmLink(boolean p_96623_) -
openLink
-
hasControlDown
public static boolean hasControlDown() -
hasShiftDown
public static boolean hasShiftDown() -
hasAltDown
public static boolean hasAltDown() -
isCut
public static boolean isCut(int p_96629_) -
isPaste
public static boolean isPaste(int p_96631_) -
isCopy
public static boolean isCopy(int p_96633_) -
isSelectAll
public static boolean isSelectAll(int p_96635_) -
repositionElements
protected void repositionElements() -
resize
-
wrapScreenError
-
isValidCharacterForName
-
isMouseOver
public boolean isMouseOver(double p_96595_, double p_96596_) - Specified by:
isMouseOver
in interfaceGuiEventListener
-
onFilesDrop
-
getMinecraft
-
scheduleNarration
private void scheduleNarration(long p_169381_, boolean p_169382_) -
suppressNarration
private void suppressNarration(long p_169379_) -
afterMouseMove
public void afterMouseMove() -
afterMouseAction
public void afterMouseAction() -
afterKeyboardAction
public void afterKeyboardAction() -
shouldRunNarration
private boolean shouldRunNarration() -
handleDelayedNarration
public void handleDelayedNarration() -
triggerImmediateNarration
public void triggerImmediateNarration(boolean p_169408_) -
runNarration
private void runNarration(boolean p_169410_) -
updateNarrationState
-
updateNarratedWidget
-
getUsageNarration
-
findNarratableWidget
@Nullable public static Screen.NarratableSearchResult findNarratableWidget(List<? extends NarratableEntry> p_169401_, @Nullable NarratableEntry p_169402_) -
narrationEnabled
public void narrationEnabled() -
clearTooltipForNextRenderPass
protected void clearTooltipForNextRenderPass() -
setTooltipForNextRenderPass
-
setTooltipForNextRenderPass
public void setTooltipForNextRenderPass(List<FormattedCharSequence> p_262939_, ClientTooltipPositioner p_263078_, boolean p_263107_) -
setTooltipForNextRenderPass
-
setTooltipForNextRenderPass
public void setTooltipForNextRenderPass(Tooltip p_262992_, ClientTooltipPositioner p_262980_, boolean p_262988_) -
getRectangle
- Specified by:
getRectangle
in interfaceGuiEventListener
-
getBackgroundMusic
-
addEventWidget
-