Package net.minecraft.client.gui.screen
Class ConnectScreen
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.AbstractParentElement
net.minecraft.client.gui.screen.Screen
net.minecraft.client.gui.screen.ConnectScreen
- All Implemented Interfaces:
Drawable,Element,ParentElement,TickableElement
@Environment(CLIENT) public class ConnectScreen extends Screen
The connection screen is used to initiate a connection to a remote server.
This is only used when connecting over LAN or to a remote dedicated server.
-
Field Summary
Fields Modifier and Type Field Description private booleanconnectingCancelledprivate ClientConnectionconnectionThe client connection to the remote server.private static AtomicIntegerCONNECTOR_THREADS_COUNTprivate static LoggerLOGGERprivate longnarratorTimerprivate Screenparentprivate TextstatusFields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, widthFields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE -
Constructor Summary
Constructors Constructor Description ConnectScreen(Screen parent, MinecraftClient client, String address, int port)ConnectScreen(Screen parent, MinecraftClient client, ServerInfo entry) -
Method Summary
Modifier and Type Method Description private voidconnect(String address, int port)protected voidinit()Called when a screen should be initialized.voidrender(MatrixStack matrices, int mouseX, int mouseY, float delta)private voidsetStatus(Text status)booleanshouldCloseOnEsc()Checks whether this screen should be closed when the escape key is pressed.voidtick()Methods inherited from class net.minecraft.client.gui.screen.Screen
addButton, addChild, children, filesDragged, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, keyPressed, onClose, removed, renderBackground, renderBackground, renderBackgroundTexture, renderOrderedTooltip, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocusedMethods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, method_33284, setZOffsetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.Element
mouseMovedMethods inherited from interface net.minecraft.client.gui.ParentElement
changeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
Field Details
-
CONNECTOR_THREADS_COUNT
-
LOGGER
-
connection
The client connection to the remote server. This is not used when connecting to the client's own integrated server. -
connectingCancelled
private boolean connectingCancelled -
parent
-
status
-
narratorTimer
private long narratorTimer
-
-
Constructor Details
-
ConnectScreen
-
ConnectScreen
-
-
Method Details
-
connect
-
setStatus
-
tick
public void tick()- Specified by:
tickin interfaceTickableElement- Overrides:
tickin classScreen
-
shouldCloseOnEsc
public boolean shouldCloseOnEsc()Checks whether this screen should be closed when the escape key is pressed.- Overrides:
shouldCloseOnEscin classScreen
-
init
protected void init()Called when a screen should be initialized.This method is called when this screen is opened or resized.
-
render
-