Package net.minecraft.client.gui.screens
Class Screen
java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
- All Implemented Interfaces:
ContainerEventHandler
,GuiEventListener
,Widget
- Direct Known Subclasses:
AbstractCommandBlockEditScreen
,AbstractContainerScreen
,AdvancementsScreen
,AlertScreen
,BackupConfirmScreen
,BookEditScreen
,BookViewScreen
,ChatScreen
,ConfirmScreen
,ConnectScreen
,CreateBuffetWorldScreen
,CreateFlatWorldScreen
,CreateWorldScreen
,CustomTooltipTest.TooltipTestScreen
,DatapackLoadFailureScreen
,DeathScreen
,DemoIntroScreen
,DirectJoinServerScreen
,DisconnectedScreen
,EditGameRulesScreen
,EditServerScreen
,EditWorldScreen
,ErrorScreen
,GameModeSwitcherScreen
,GenericDirtMessageScreen
,GuiLayeringTest.ClientEvents.TestLayer
,JigsawBlockEditScreen
,JoinMultiplayerScreen
,LevelLoadingScreen
,ModListScreen
,NotificationModUpdateScreen
,OptimizeWorldScreen
,OptionsScreen
,OptionsSubScreen
,OutOfMemoryScreen
,PackSelectionScreen
,PauseScreen
,PopupScreen
,PresetFlatWorldScreen
,ProgressScreen
,RealmsScreen
,ReceivingLevelScreen
,SafetyScreen
,SelectWorldScreen
,ShareToLanScreen
,SignEditScreen
,SocialInteractionsScreen
,StatsScreen
,StructureBlockEditScreen
,TitleScreen
,WinScreen
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate List<GuiEventListener>
private URI
private static int
protected Font
int
protected ItemRenderer
private NarratableEntry
private static org.apache.logging.log4j.Logger
protected Minecraft
private List<NarratableEntry>
private static long
private static long
private static long
private static long
private static long
private ScreenNarrationCollector
private long
private long
boolean
protected Component
private Font
private ItemStack
private static Component
int
Fields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected <T extends Widget>
TaddRenderableOnly(T p_169395_)
protected <T extends GuiEventListener & Widget & NarratableEntry>
TaddRenderableWidget(T p_169406_)
protected <T extends GuiEventListener & NarratableEntry>
TaddWidget(T p_96625_)
void
void
void
List<? extends GuiEventListener>
children()
protected void
private void
confirmLink(boolean p_96623_)
findNarratableWidget(List<? extends NarratableEntry> p_169401_, NarratableEntry p_169402_)
getTitle()
getTooltipFromItem(ItemStack p_96556_)
boolean
handleComponentClicked(Style p_96592_)
void
static boolean
static boolean
static boolean
protected void
init()
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
void
removed()
protected void
removeWidget(GuiEventListener p_169412_)
void
void
renderBackground(PoseStack p_96557_)
void
renderBackground(PoseStack p_96559_, int p_96560_)
protected void
renderComponentHoverEffect(PoseStack p_96571_, Style p_96572_, int p_96573_, int p_96574_)
void
renderComponentTooltip(PoseStack poseStack, List<? extends FormattedText> tooltips, int mouseX, int mouseY, Font font)
void
renderComponentTooltip(PoseStack poseStack, List<? extends FormattedText> tooltips, int mouseX, int mouseY, Font font, ItemStack stack)
void
renderComponentTooltip(PoseStack poseStack, List<? extends FormattedText> tooltips, int mouseX, int mouseY, ItemStack stack)
void
renderComponentTooltip(PoseStack p_96598_, List<Component> p_96599_, int p_96600_, int p_96601_)
void
renderComponentToolTip(PoseStack poseStack, List<? extends FormattedText> tooltips, int mouseX, int mouseY, Font font)
Deprecated, for removal: This API element is subject to removal in a future version.void
renderDirtBackground(int p_96627_)
void
renderTooltip(PoseStack p_96618_, List<? extends FormattedCharSequence> p_96619_, int p_96620_, int p_96621_)
void
renderTooltip(PoseStack poseStack, List<? extends FormattedCharSequence> lines, int x, int y, Font font)
void
renderTooltip(PoseStack p_169389_, List<Component> p_169390_, Optional<TooltipComponent> p_169391_, int p_169392_, int p_169393_)
void
renderTooltip(PoseStack poseStack, List<Component> textComponents, Optional<TooltipComponent> tooltipComponent, int x, int y, Font font)
void
renderTooltip(PoseStack poseStack, List<Component> textComponents, Optional<TooltipComponent> tooltipComponent, int x, int y, Font font, ItemStack stack)
void
renderTooltip(PoseStack poseStack, List<Component> textComponents, Optional<TooltipComponent> tooltipComponent, int x, int y, ItemStack stack)
void
renderTooltip(PoseStack p_96603_, Component p_96604_, int p_96605_, int p_96606_)
protected void
renderTooltip(PoseStack p_96566_, ItemStack p_96567_, int p_96568_, int p_96569_)
void
renderToolTip(PoseStack p_96618_, List<? extends FormattedCharSequence> p_96619_, int p_96620_, int p_96621_, Font font)
Deprecated, for removal: This API element is subject to removal in a future version.private void
renderTooltipInternal(PoseStack p_169384_, List<ClientTooltipComponent> p_169385_, int p_169386_, int p_169387_)
void
private void
runNarration(boolean p_169410_)
private void
scheduleNarration(long p_169381_, boolean p_169382_)
void
sendMessage(String p_96616_)
void
sendMessage(String p_96613_, boolean p_96614_)
boolean
private boolean
private void
suppressNarration(long p_169379_)
void
tick()
protected 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 net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, fill, fillGradient, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine
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
changeFocus, charTyped, getChildAt, keyReleased, magicalSpecialHackyFocus, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
ALLOWED_PROTOCOLS
-
EXTRA_SPACE_AFTER_FIRST_TOOLTIP_LINE
private static final int EXTRA_SPACE_AFTER_FIRST_TOOLTIP_LINE- See Also:
- Constant Field Values
-
USAGE_NARRATION
-
title
-
children
-
narratables
-
minecraft
-
itemRenderer
-
width
public int width -
height
public int height -
renderables
-
passEvents
public boolean passEvents -
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:
- Constant Field Values
-
NARRATE_DELAY_MOUSE_ACTION
private static final long NARRATE_DELAY_MOUSE_ACTION- See Also:
- Constant Field Values
-
NARRATE_DELAY_KEYBOARD_ACTION
private static final long NARRATE_DELAY_KEYBOARD_ACTION- See Also:
- Constant Field Values
-
narrationState
-
narrationSuppressTime
private long narrationSuppressTime -
nextNarrationTime
private long nextNarrationTime -
lastNarratable
-
tooltipFont
-
tooltipStack
-
-
Constructor Details
-
Screen
-
-
Method Details
-
getTitle
-
getNarrationMessage
-
render
-
keyPressed
public boolean keyPressed(int p_96552_, int p_96553_, int p_96554_)- Specified by:
keyPressed
in interfaceContainerEventHandler
- Specified by:
keyPressed
in interfaceGuiEventListener
-
shouldCloseOnEsc
public boolean shouldCloseOnEsc() -
onClose
public void onClose() -
addRenderableWidget
protected <T extends GuiEventListener & Widget & NarratableEntry> T addRenderableWidget(T p_169406_) -
addRenderableOnly
-
addWidget
-
removeWidget
-
clearWidgets
protected void clearWidgets() -
renderTooltip
-
renderTooltip
-
renderTooltip
-
renderTooltip
-
renderTooltip
public void renderTooltip(PoseStack p_169389_, List<Component> p_169390_, Optional<TooltipComponent> p_169391_, int p_169392_, int p_169393_) -
getTooltipFromItem
-
renderTooltip
-
renderComponentTooltip
-
renderComponentTooltip
public void renderComponentTooltip(PoseStack poseStack, List<? extends FormattedText> tooltips, int mouseX, int mouseY, ItemStack stack) -
renderComponentTooltip
public void renderComponentTooltip(PoseStack poseStack, List<? extends FormattedText> tooltips, int mouseX, int mouseY, @Nullable Font font) -
renderComponentToolTip
@Deprecated(forRemoval=true, since="1.17.1") public void renderComponentToolTip(PoseStack poseStack, List<? extends FormattedText> tooltips, int mouseX, int mouseY, @Nullable Font font)Deprecated, for removal: This API element is subject to removal in a future version. -
renderComponentTooltip
public void renderComponentTooltip(PoseStack poseStack, List<? extends FormattedText> tooltips, int mouseX, int mouseY, @Nullable Font font, ItemStack stack) -
renderTooltip
public void renderTooltip(PoseStack p_96618_, List<? extends FormattedCharSequence> p_96619_, int p_96620_, int p_96621_) -
renderToolTip
@Deprecated(forRemoval=true, since="1.17.1") public void renderToolTip(PoseStack p_96618_, List<? extends FormattedCharSequence> p_96619_, int p_96620_, int p_96621_, Font font)Deprecated, for removal: This API element is subject to removal in a future version. -
renderTooltip
public void renderTooltip(PoseStack poseStack, List<? extends FormattedCharSequence> lines, int x, int y, Font font) -
renderTooltipInternal
private void renderTooltipInternal(PoseStack p_169384_, List<ClientTooltipComponent> p_169385_, int p_169386_, int p_169387_) -
renderComponentHoverEffect
-
insertText
-
handleComponentClicked
-
sendMessage
-
sendMessage
-
init
-
children
- Specified by:
children
in interfaceContainerEventHandler
-
init
protected void init() -
tick
public void tick() -
removed
public void removed() -
renderBackground
-
renderBackground
-
renderDirtBackground
public void renderDirtBackground(int p_96627_) -
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_) -
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
protected void triggerImmediateNarration(boolean p_169408_) -
runNarration
private void runNarration(boolean p_169410_) -
updateNarrationState
-
updateNarratedWidget
-
findNarratableWidget
@Nullable public static Screen.NarratableSearchResult findNarratableWidget(List<? extends NarratableEntry> p_169401_, @Nullable NarratableEntry p_169402_) -
narrationEnabled
public void narrationEnabled()
-