net.minecraft.client.gui.screen

public abstract class Screen

extends AbstractParentElement implements Drawable

All mapped superinterfaces:

ParentElement, Element, Navigable, Drawable

net.minecraft.client.gui.screens.Screen
net.minecraft.class_437
net.minecraft.client.gui.screen.Screen

Field summary

Modifier and TypeField
private static final org.slf4j.Logger
LOGGER
field_22782
LOGGER
private static final Text
SCREEN_USAGE_NARRATION
field_33814
SCREEN_USAGE_TEXT
public static final Identifier
MENU_BACKGROUND
field_49511
MENU_BACKGROUND_TEXTURE
public static final Identifier
HEADER_SEPARATOR
field_49895
HEADER_SEPARATOR_TEXTURE
public static final Identifier
FOOTER_SEPARATOR
field_49896
FOOTER_SEPARATOR_TEXTURE
private static final Identifier
INWORLD_MENU_BACKGROUND
field_49894
INWORLD_MENU_BACKGROUND_TEXTURE
public static final Identifier
INWORLD_HEADER_SEPARATOR
field_49897
INWORLD_HEADER_SEPARATOR_TEXTURE
public static final Identifier
INWORLD_FOOTER_SEPARATOR
field_49898
INWORLD_FOOTER_SEPARATOR_TEXTURE
protected static final float
FADE_IN_TIME
field_60460
field_60460
protected final Text
title
field_22785
title
private final List<Element>
children
field_22786
children
private final List<Selectable>
narratables
field_33815
selectables
protected final MinecraftClient
minecraft
field_22787
client
private boolean
initialized
field_42156
screenInitialized
public int
width
field_22789
width
public int
height
field_22790
height
private final List<Drawable>
renderables
field_33816
drawables
protected final TextRenderer
font
field_22793
textRenderer
private static final long
NARRATE_SUPPRESS_AFTER_INIT_TIME
field_33817
SCREEN_INIT_NARRATION_DELAY
private static final long
NARRATE_DELAY_NARRATOR_ENABLED
field_33818
NARRATOR_MODE_CHANGE_DELAY
private static final long
NARRATE_DELAY_MOUSE_MOVE
field_33819
MOUSE_MOVE_NARRATION_DELAY
private static final long
NARRATE_DELAY_MOUSE_ACTION
field_33820
MOUSE_PRESS_SCROLL_NARRATION_DELAY
private static final long
NARRATE_DELAY_KEYBOARD_ACTION
field_33821
KEY_PRESS_NARRATION_DELAY
private final ScreenNarrator
narrationState
field_33822
narrator
private long
narrationSuppressTime
field_33823
elementNarrationStartTime
private long
nextNarrationTime
field_33824
screenNarrationStartTime
protected CyclingButtonWidget<NarratorMode>
narratorButton
field_52252
narratorToggleButton
private Selectable
lastNarratable
field_33813
selected
protected final Executor
screenExecutor
field_44944
executor

Constructor summary

ModifierConstructor
protected (Text title)
protected (MinecraftClient client, TextRenderer textRenderer, Text title)

Method summary

Modifier and TypeMethod
public Text
getTitle()
method_25440()
getTitle()
public Text
getNarrationMessage()
method_25435()
getNarratedTitle()
public final void
extractRenderStateWithTooltipAndSubtitles(GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a)
method_47413(class_332 arg0, int arg1, int arg2, float arg3)
renderWithTooltip(DrawContext context, int mouseX, int mouseY, float deltaTicks)
public void
extractRenderState(GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a)
method_25394(class_332 arg0, int arg1, int arg2, float arg3)
render(DrawContext arg0, int arg1, int arg2, float arg3)
public boolean
keyPressed(KeyEvent event)
method_25404(class_11908 arg0)
keyPressed(KeyInput arg0)
private GuiNavigation$Tab
createTabEvent(boolean forward)
method_48266(boolean arg0)
getTabNavigation(boolean forward)
private GuiNavigation$Arrow
createArrowEvent(ScreenDirection direction)
method_48264(class_8028 arg0)
getArrowNavigation(NavigationDirection direction)
protected void
setInitialFocus()
method_56131()
setInitialFocus()
protected void
setInitialFocus(GuiEventListener target)
method_48265(class_364 arg0)
setInitialFocus(Element element)
public void
clearFocus()
method_48267()
blur()
protected void
changeFocus(ComponentPath componentPath)
method_48263(class_8016 arg0)
switchFocus(GuiNavigationPath path)
public boolean
shouldCloseOnEsc()
method_25422()
shouldCloseOnEsc()
public void
onClose()
method_25419()
close()
protected <T extends Element, Drawable, Selectable> T
addRenderableWidget(T widget)
method_37063(T arg0)
addDrawableChild(T drawableElement)
protected <T extends Drawable> T
addRenderableOnly(T renderable)
method_37060(T arg0)
addDrawable(T drawable)
protected <T extends Element, Selectable> T
addWidget(T widget)
method_25429(T arg0)
addSelectableChild(T child)
protected void
removeWidget(GuiEventListener widget)
method_37066(class_364 arg0)
remove(Element child)
protected void
clearWidgets()
method_37067()
clearChildren()
public static List<Text>
getTooltipFromItem(Minecraft minecraft, ItemStack itemStack)
method_25408(class_310 arg0, class_1799 arg1)
getTooltipFromItem(MinecraftClient client, ItemStack stack)
protected void
insertText(String text, boolean replace)
method_25415(String arg0, boolean arg1)
insertText(String text, boolean override)
protected static void
defaultHandleGameClickEvent(ClickEvent event, Minecraft minecraft, Screen activeScreen)
method_71999(class_2558 arg0, class_310 arg1, class_437 arg2)
handleClickEvent(ClickEvent clickEvent, MinecraftClient client, Screen screenAfterRun)
protected static void
defaultHandleClickEvent(ClickEvent event, Minecraft minecraft, Screen activeScreen)
method_71847(class_2558 arg0, class_310 arg1, class_437 arg2)
handleBasicClickEvent(ClickEvent clickEvent, MinecraftClient client, Screen screenAfterRun)
protected static boolean
clickUrlAction(Minecraft minecraft, Screen screen, URI uri)
method_71843(class_310 arg0, class_437 arg1, URI arg2)
handleOpenUri(MinecraftClient client, Screen screen, URI uri)
protected static void
clickCommandAction(LocalPlayer player, String command, Screen screenAfterCommand)
method_71844(class_746 arg0, String arg1, class_437 arg2)
handleRunCommand(ClientPlayerEntity player, String command, Screen screenAfterRun)
public final void
init(int width, int height)
method_25423(int arg0, int arg1)
init(int width, int height)
protected void
rebuildWidgets()
method_41843()
clearAndInit()
protected void
fadeWidgets(float widgetFade)
method_71536(float arg0)
setWidgetAlpha(float alpha)
public List<? extends Element>
children()
method_25396()
children()
protected void
init()
method_25426()
init()
public void
tick()
method_25393()
tick()
public void
removed()
method_25432()
removed()
public void
added()
method_49589()
onDisplayed()
public void
extractBackground(GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a)
method_25420(class_332 arg0, int arg1, int arg2, float arg3)
renderBackground(DrawContext context, int mouseX, int mouseY, float deltaTicks)
protected void
extractBlurredBackground(GuiGraphicsExtractor graphics)
method_57734(class_332 arg0)
applyBlur(DrawContext context)
protected void
extractPanorama(GuiGraphicsExtractor graphics, float a)
method_57728(class_332 arg0, float arg1)
renderPanoramaBackground(DrawContext context, float deltaTicks)
protected void
extractMenuBackground(GuiGraphicsExtractor graphics)
method_57735(class_332 arg0)
renderDarkening(DrawContext context)
protected void
extractMenuBackground(GuiGraphicsExtractor graphics, int x, int y, int width, int height)
method_57736(class_332 arg0, int arg1, int arg2, int arg3, int arg4)
renderDarkening(DrawContext context, int x, int y, int width, int height)
public static void
extractMenuBackgroundTexture(GuiGraphicsExtractor graphics, Identifier menuBackground, int x, int y, float u, float v, int width, int height)
method_57737(class_332 arg0, class_2960 arg1, int arg2, int arg3, float arg4, float arg5, int arg6, int arg7)
renderBackgroundTexture(DrawContext context, Identifier texture, int x, int y, float u, float v, int width, int height)
public void
extractTransparentBackground(GuiGraphicsExtractor graphics)
method_52752(class_332 arg0)
renderInGameBackground(DrawContext context)
public boolean
isPauseScreen()
method_25421()
shouldPause()
public boolean
isInGameUi()
method_73150()
deferSubtitles()
public boolean
isAllowedInPortal()
method_73217()
keepOpenThroughPortal()
protected void
repositionElements()
method_48640()
refreshWidgetPositions()
public void
resize(int width, int height)
method_25410(int arg0, int arg1)
resize(int width, int height)
public void
fillCrashDetails(CrashReport report)
method_65027(class_128 arg0)
addCrashReportSection(CrashReport report)
protected boolean
isValidCharacterForName(String currentName, int newChar, int cursorPos)
method_25414(String arg0, int arg1, int arg2)
isValidCharacterForName(String name, int codepoint, int cursorPos)
public boolean
isMouseOver(double mouseX, double mouseY)
method_25405(double arg0, double arg1)
isMouseOver(double arg0, double arg1)
public void
onFilesDrop(List<Path> files)
method_29638(List<Path> arg0)
onFilesDropped(List<Path> paths)
private void
scheduleNarration(long delay, boolean ignoreSuppression)
method_37059(long arg0, boolean arg1)
setScreenNarrationDelay(long delayMs, boolean restartElementNarration)
private void
suppressNarration(long duration)
method_37058(long arg0)
setElementNarrationDelay(long delayMs)
private void
setNarrationSuppressTime(long narrationSuppressTime)
method_72802(long arg0)
setElementNarrationStartTime(long startTimeMs)
public void
afterMouseMove()
method_37068()
applyMouseMoveNarratorDelay()
public void
afterMouseAction()
method_37069()
applyMousePressScrollNarratorDelay()
public void
afterKeyboardAction()
method_37070()
applyKeyPressNarratorDelay()
private boolean
shouldRunNarration()
method_37073()
isNarratorActive()
public void
handleDelayedNarration()
method_37071()
updateNarrator()
public void
triggerImmediateNarration(boolean onlyChanged)
method_37064(boolean arg0)
narrateScreenIfNarrationEnabled(boolean onlyChangedNarrations)
private void
runNarration(boolean onlyChanged)
method_37065(boolean arg0)
narrateScreen(boolean onlyChangedNarrations)
protected boolean
shouldNarrateNavigation()
method_48262()
hasUsageText()
protected void
updateNarrationState(NarrationElementOutput output)
method_37062(class_6382 arg0)
addScreenNarrations(NarrationMessageBuilder messageBuilder)
protected void
updateNarratedWidget(NarrationElementOutput output)
method_37056(class_6382 arg0)
addElementNarrations(NarrationMessageBuilder builder)
protected Text
getUsageNarration()
method_53870()
getUsageNarrationText()
public static Screen$SelectedElementNarrationData
findNarratableWidget(List<? extends NarratableEntry> narratableEntries, NarratableEntry lastNarratable)
method_37061(List<? extends class_6379> arg0, class_6379 arg1)
findSelectedElementData(List<? extends Selectable> selectables, Selectable selectable)
public void
updateNarratorStatus(boolean wasDisabled)
method_61040(boolean arg0)
refreshNarrator(boolean previouslyDisabled)
public TextRenderer
getFont()
method_64506()
getTextRenderer()
public boolean
showsActiveEffects()
method_64507()
showsStatusEffects()
public boolean
canInterruptWithAnotherScreen()
method_73339()
canBeInterruptedByOtherScreen()
public ScreenRect
getRectangle()
method_48202()
getNavigationFocus()
public MusicSound
getBackgroundMusic()
method_50024()
getMusic()
private static Stream
lambda$updateNarratedWidget$0(NarratableEntry arg0)
method_65517(class_6379 arg0)
method_65517(Selectable selectable)
private String
lambda$fillCrashDetails$0()
method_65026()
method_65026()
private static void
lambda$clickUrlAction$0(URI arg0, Minecraft arg1, Screen arg2, boolean arg3)
method_71845(URI arg0, class_310 arg1, class_437 arg2, boolean arg3)
method_71845(URI arg0, MinecraftClient arg1, Screen arg2, boolean confirmed)
private void
lambda$new$0(Minecraft arg0, Runnable arg1)
method_75366(class_310 arg0, Runnable arg1)
method_75366(MinecraftClient arg0, Runnable arg1)
private void
lambda$new$1(Minecraft arg0, Runnable arg1)
method_75367(class_310 arg0, Runnable arg1)
method_75367(MinecraftClient arg0, Runnable arg1)