Class MultiplayerServerListWidget
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.AbstractParentElement
net.minecraft.client.gui.widget.EntryListWidget<E>
net.minecraft.client.gui.widget.AlwaysSelectedEntryListWidget<MultiplayerServerListWidget.Entry>
net.minecraft.client.gui.screen.multiplayer.MultiplayerServerListWidget
- All Implemented Interfaces:
Drawable
,Element
,ParentElement
@Environment(CLIENT) public class MultiplayerServerListWidget extends AlwaysSelectedEntryListWidget<MultiplayerServerListWidget.Entry>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MultiplayerServerListWidget.Entry
static class
MultiplayerServerListWidget.LanServerEntry
static class
MultiplayerServerListWidget.ScanningEntry
class
MultiplayerServerListWidget.ServerEntry
Nested classes/interfaces inherited from class net.minecraft.client.gui.widget.EntryListWidget
EntryListWidget.MoveDirection
-
Field Summary
Fields Modifier and Type Field Description private static Text
field_26581
private static Text
field_26582
private static Text
field_26583
private static Text
field_26586
private static Text
field_26587
private static Text
field_26849
private List<MultiplayerServerListWidget.LanServerEntry>
lanServers
private static Logger
LOGGER
private MultiplayerServerListWidget.Entry
scanningEntry
private MultiplayerScreen
screen
private static ThreadPoolExecutor
SERVER_PINGER_THREAD_POOL
private static Identifier
SERVER_SELECTION_TEXTURE
private List<MultiplayerServerListWidget.ServerEntry>
servers
private static Identifier
UNKNOWN_SERVER_TEXTURE
Fields inherited from class net.minecraft.client.gui.widget.EntryListWidget
bottom, centerListVertically, client, headerHeight, height, itemHeight, left, right, top, width
Fields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
-
Constructor Summary
Constructors Constructor Description MultiplayerServerListWidget(MultiplayerScreen screen, MinecraftClient client, int width, int height, int top, int bottom, int entryHeight)
-
Method Summary
Modifier and Type Method Description int
getRowWidth()
protected int
getScrollbarPositionX()
protected boolean
isFocused()
boolean
keyPressed(int keyCode, int scanCode, int modifiers)
Callback for when a key down event has been captured.protected void
moveSelection(EntryListWidget.MoveDirection direction)
void
setLanServers(List<LanServerInfo> lanServers)
void
setSelected(MultiplayerServerListWidget.Entry entry)
void
setServers(ServerList servers)
private void
updateEntries()
Methods inherited from class net.minecraft.client.gui.widget.AlwaysSelectedEntryListWidget
changeFocus
Methods inherited from class net.minecraft.client.gui.widget.EntryListWidget
addEntry, centerScrollOn, children, clearEntries, clickedHeader, ensureVisible, getEntry, getEntryAtPosition, getFocused, getItemCount, getMaxPosition, getMaxScroll, getRowLeft, getRowTop, getScrollAmount, getSelected, isMouseOver, isSelectedItem, method_30015, method_31322, method_31323, method_31383, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, moveSelectionIf, remove, removeEntry, render, renderBackground, renderDecorations, renderHeader, renderList, replaceEntries, setLeftPos, setRenderHeader, setRenderSelection, setScrollAmount, updateScrollingState, updateSize
Methods inherited from class net.minecraft.client.gui.AbstractParentElement
isDragging, setDragging, setFocused
Methods 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, setZOffset
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.Element
mouseMoved
Methods inherited from interface net.minecraft.client.gui.ParentElement
charTyped, focusOn, hoveredElement, keyReleased, setInitialFocus
-
Field Details
-
LOGGER
-
SERVER_PINGER_THREAD_POOL
-
UNKNOWN_SERVER_TEXTURE
-
SERVER_SELECTION_TEXTURE
-
field_26581
-
field_26582
-
field_26583
-
field_26849
-
field_26586
-
field_26587
-
screen
-
servers
-
scanningEntry
-
lanServers
-
-
Constructor Details
-
MultiplayerServerListWidget
public MultiplayerServerListWidget(MultiplayerScreen screen, MinecraftClient client, int width, int height, int top, int bottom, int entryHeight)
-
-
Method Details
-
updateEntries
private void updateEntries() -
setSelected
- Overrides:
setSelected
in classEntryListWidget<MultiplayerServerListWidget.Entry>
-
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers)Callback for when a key down event has been captured. The key code is identified by the constants inGLFW
class.- Specified by:
keyPressed
in interfaceElement
- Specified by:
keyPressed
in interfaceParentElement
- Overrides:
keyPressed
in classEntryListWidget<MultiplayerServerListWidget.Entry>
- Parameters:
keyCode
- the named key code of the event as described in theGLFW
classscanCode
- the unique/platform-specific scan code of the keyboard inputmodifiers
- a GLFW bitfield describing the modifier keys that are held down (see {@linkplain https://www.glfw.org/docs/3.3/group__mods.html GLFW Modifier key flags})- Returns:
true
to indicate that the event handling is successful/valid- See Also:
Keyboard.onKey(long, int, int, int, int)
,GLFW.GLFW_KEY_Q
,GLFWKeyCallbackI.invoke(long, int, int, int, int)
-
moveSelection
- Overrides:
moveSelection
in classEntryListWidget<MultiplayerServerListWidget.Entry>
-
setServers
-
setLanServers
-
getScrollbarPositionX
protected int getScrollbarPositionX()- Overrides:
getScrollbarPositionX
in classEntryListWidget<MultiplayerServerListWidget.Entry>
-
getRowWidth
public int getRowWidth()- Overrides:
getRowWidth
in classEntryListWidget<MultiplayerServerListWidget.Entry>
-
isFocused
protected boolean isFocused()- Overrides:
isFocused
in classEntryListWidget<MultiplayerServerListWidget.Entry>
-