Package net.minecraft.client.gui.screen
Class Screen
- java.lang.Object
-
- net.minecraft.client.gui.AbstractGui
-
- net.minecraft.client.gui.FocusableGui
-
- net.minecraft.client.gui.screen.Screen
-
- All Implemented Interfaces:
IGuiEventListener
,INestedGuiEventHandler
,IRenderable
,IScreen
- Direct Known Subclasses:
AbstractCommandBlockScreen
,AddServerScreen
,AdvancementsScreen
,AlertScreen
,ChatScreen
,ConfirmBackupScreen
,ConfirmScreen
,ConnectingScreen
,ContainerScreen
,CreateBuffetWorldScreen
,CreateFlatWorldScreen
,CreateWorldScreen
,DatapackFailureScreen
,DeathScreen
,DemoScreen
,DirtMessageScreen
,DisconnectedScreen
,DownloadTerrainScreen
,EditBookScreen
,EditGamerulesScreen
,EditSignScreen
,EditStructureScreen
,EditWorldScreen
,ErrorScreen
,FlatPresetsScreen
,GamemodeSelectionScreen
,GPUWarningScreen
,GuiLayeringTest.ClientEvents.TestLayer
,IngameMenuScreen
,JigsawScreen
,MainMenuScreen
,MemoryErrorScreen
,ModListScreen
,MultiplayerScreen
,MultiplayerWarningScreen
,NotificationModUpdateScreen
,OptimizeWorldScreen
,OptionsScreen
,PackScreen
,ReadBookScreen
,RealmsScreen
,ServerListScreen
,SettingsScreen
,ShareToLanScreen
,SocialInteractionsScreen
,StatsScreen
,WinGameScreen
,WorkingScreen
,WorldLoadProgressScreen
,WorldSelectionScreen
public abstract class Screen extends FocusableGui implements IScreen, IRenderable
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Set<java.lang.String>
ALLOWED_PROTOCOLS
protected java.util.List<Widget>
buttons
protected java.util.List<IGuiEventListener>
children
private java.net.URI
clickedLink
protected FontRenderer
font
int
height
protected ItemRenderer
itemRenderer
private static org.apache.logging.log4j.Logger
LOGGER
protected Minecraft
minecraft
boolean
passEvents
protected ITextComponent
title
int
width
-
Fields inherited from class net.minecraft.client.gui.AbstractGui
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Screen(ITextComponent p_i51108_1_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T extends Widget>
TaddButton(T p_230480_1_)
protected <T extends IGuiEventListener>
TaddWidget(T p_230481_1_)
java.util.List<? extends IGuiEventListener>
children()
private void
confirmLink(boolean p_231162_1_)
Minecraft
getMinecraft()
java.lang.String
getNarrationMessage()
ITextComponent
getTitle()
java.util.List<ITextComponent>
getTooltipFromItem(ItemStack p_231151_1_)
boolean
handleComponentClicked(Style p_230455_1_)
static boolean
hasAltDown()
static boolean
hasControlDown()
static boolean
hasShiftDown()
protected void
init()
void
init(Minecraft p_231158_1_, int p_231158_2_, int p_231158_3_)
protected void
insertText(java.lang.String p_231155_1_, boolean p_231155_2_)
static boolean
isCopy(int p_231169_0_)
static boolean
isCut(int p_231166_0_)
boolean
isMouseOver(double p_231047_1_, double p_231047_3_)
static boolean
isPaste(int p_231168_0_)
boolean
isPauseScreen()
static boolean
isSelectAll(int p_231170_0_)
protected boolean
isValidCharacterForName(java.lang.String p_231154_1_, char p_231154_2_, int p_231154_3_)
boolean
keyPressed(int p_231046_1_, int p_231046_2_, int p_231046_3_)
void
onClose()
void
onFilesDrop(java.util.List<java.nio.file.Path> p_230476_1_)
private void
openLink(java.net.URI p_231156_1_)
void
removed()
void
render(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_)
void
renderBackground(MatrixStack p_230446_1_)
void
renderBackground(MatrixStack p_238651_1_, int p_238651_2_)
protected void
renderComponentHoverEffect(MatrixStack p_238653_1_, Style p_238653_2_, int p_238653_3_, int p_238653_4_)
void
renderComponentTooltip(MatrixStack p_243308_1_, java.util.List<ITextComponent> p_243308_2_, int p_243308_3_, int p_243308_4_)
void
renderDirtBackground(int p_231165_1_)
void
renderTooltip(MatrixStack p_238654_1_, java.util.List<? extends IReorderingProcessor> p_238654_2_, int p_238654_3_, int p_238654_4_)
protected void
renderTooltip(MatrixStack p_230457_1_, ItemStack p_230457_2_, int p_230457_3_, int p_230457_4_)
void
renderTooltip(MatrixStack p_238652_1_, ITextComponent p_238652_2_, int p_238652_3_, int p_238652_4_)
void
renderToolTip(MatrixStack p_238654_1_, java.util.List<? extends IReorderingProcessor> p_238654_2_, int p_238654_3_, int p_238654_4_, FontRenderer font)
void
renderWrappedToolTip(MatrixStack matrixStack, java.util.List<? extends ITextProperties> tooltips, int mouseX, int mouseY, FontRenderer font)
void
resize(Minecraft p_231152_1_, int p_231152_2_, int p_231152_3_)
void
sendMessage(java.lang.String p_231161_1_)
void
sendMessage(java.lang.String p_231159_1_, boolean p_231159_2_)
boolean
shouldCloseOnEsc()
void
tick()
static void
wrapScreenError(java.lang.Runnable p_231153_0_, java.lang.String p_231153_1_, java.lang.String p_231153_2_)
-
Methods inherited from class net.minecraft.client.gui.FocusableGui
getFocused, isDragging, setDragging, setFocused
-
Methods inherited from class net.minecraft.client.gui.AbstractGui
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, 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.IGuiEventListener
mouseMoved
-
Methods inherited from interface net.minecraft.client.gui.INestedGuiEventHandler
changeFocus, charTyped, getChildAt, keyReleased, magicalSpecialHackyFocus, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
ALLOWED_PROTOCOLS
private static final java.util.Set<java.lang.String> ALLOWED_PROTOCOLS
-
title
protected final ITextComponent title
-
children
protected final java.util.List<IGuiEventListener> children
-
minecraft
@Nullable protected Minecraft minecraft
-
itemRenderer
protected ItemRenderer itemRenderer
-
width
public int width
-
height
public int height
-
buttons
protected final java.util.List<Widget> buttons
-
passEvents
public boolean passEvents
-
font
protected FontRenderer font
-
clickedLink
private java.net.URI clickedLink
-
-
Constructor Detail
-
Screen
protected Screen(ITextComponent p_i51108_1_)
-
-
Method Detail
-
getTitle
public ITextComponent getTitle()
-
getNarrationMessage
public java.lang.String getNarrationMessage()
-
render
public void render(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_)
- Specified by:
render
in interfaceIRenderable
-
keyPressed
public boolean keyPressed(int p_231046_1_, int p_231046_2_, int p_231046_3_)
- Specified by:
keyPressed
in interfaceIGuiEventListener
- Specified by:
keyPressed
in interfaceINestedGuiEventHandler
-
shouldCloseOnEsc
public boolean shouldCloseOnEsc()
-
onClose
public void onClose()
-
addButton
protected <T extends Widget> T addButton(T p_230480_1_)
-
addWidget
protected <T extends IGuiEventListener> T addWidget(T p_230481_1_)
-
renderTooltip
protected void renderTooltip(MatrixStack p_230457_1_, ItemStack p_230457_2_, int p_230457_3_, int p_230457_4_)
-
getTooltipFromItem
public java.util.List<ITextComponent> getTooltipFromItem(ItemStack p_231151_1_)
-
renderTooltip
public void renderTooltip(MatrixStack p_238652_1_, ITextComponent p_238652_2_, int p_238652_3_, int p_238652_4_)
-
renderComponentTooltip
public void renderComponentTooltip(MatrixStack p_243308_1_, java.util.List<ITextComponent> p_243308_2_, int p_243308_3_, int p_243308_4_)
-
renderWrappedToolTip
public void renderWrappedToolTip(MatrixStack matrixStack, java.util.List<? extends ITextProperties> tooltips, int mouseX, int mouseY, FontRenderer font)
-
renderTooltip
public void renderTooltip(MatrixStack p_238654_1_, java.util.List<? extends IReorderingProcessor> p_238654_2_, int p_238654_3_, int p_238654_4_)
-
renderToolTip
public void renderToolTip(MatrixStack p_238654_1_, java.util.List<? extends IReorderingProcessor> p_238654_2_, int p_238654_3_, int p_238654_4_, FontRenderer font)
-
renderComponentHoverEffect
protected void renderComponentHoverEffect(MatrixStack p_238653_1_, @Nullable Style p_238653_2_, int p_238653_3_, int p_238653_4_)
-
insertText
protected void insertText(java.lang.String p_231155_1_, boolean p_231155_2_)
-
handleComponentClicked
public boolean handleComponentClicked(@Nullable Style p_230455_1_)
-
sendMessage
public void sendMessage(java.lang.String p_231161_1_)
-
sendMessage
public void sendMessage(java.lang.String p_231159_1_, boolean p_231159_2_)
-
init
public void init(Minecraft p_231158_1_, int p_231158_2_, int p_231158_3_)
-
children
public java.util.List<? extends IGuiEventListener> children()
- Specified by:
children
in interfaceINestedGuiEventHandler
-
init
protected void init()
-
removed
public void removed()
-
renderBackground
public void renderBackground(MatrixStack p_230446_1_)
-
renderBackground
public void renderBackground(MatrixStack p_238651_1_, int p_238651_2_)
-
renderDirtBackground
public void renderDirtBackground(int p_231165_1_)
-
isPauseScreen
public boolean isPauseScreen()
-
confirmLink
private void confirmLink(boolean p_231162_1_)
-
openLink
private void openLink(java.net.URI p_231156_1_)
-
hasControlDown
public static boolean hasControlDown()
-
hasShiftDown
public static boolean hasShiftDown()
-
hasAltDown
public static boolean hasAltDown()
-
isCut
public static boolean isCut(int p_231166_0_)
-
isPaste
public static boolean isPaste(int p_231168_0_)
-
isCopy
public static boolean isCopy(int p_231169_0_)
-
isSelectAll
public static boolean isSelectAll(int p_231170_0_)
-
resize
public void resize(Minecraft p_231152_1_, int p_231152_2_, int p_231152_3_)
-
wrapScreenError
public static void wrapScreenError(java.lang.Runnable p_231153_0_, java.lang.String p_231153_1_, java.lang.String p_231153_2_)
-
isValidCharacterForName
protected boolean isValidCharacterForName(java.lang.String p_231154_1_, char p_231154_2_, int p_231154_3_)
-
isMouseOver
public boolean isMouseOver(double p_231047_1_, double p_231047_3_)
- Specified by:
isMouseOver
in interfaceIGuiEventListener
-
onFilesDrop
public void onFilesDrop(java.util.List<java.nio.file.Path> p_230476_1_)
-
getMinecraft
public Minecraft getMinecraft()
-
-