Class ServerSelectionList.OnlineServerEntry
java.lang.Object
net.minecraft.client.gui.components.AbstractSelectionList.Entry<ServerSelectionList.Entry>
net.minecraft.client.gui.components.ObjectSelectionList.Entry<ServerSelectionList.Entry>
net.minecraft.client.gui.screens.multiplayer.ServerSelectionList.Entry
net.minecraft.client.gui.screens.multiplayer.ServerSelectionList.OnlineServerEntry
- All Implemented Interfaces:
AutoCloseable, GuiEventListener, SelectableEntry, TabOrderedElement, LayoutElement, NarrationSupplier
- Enclosing class:
ServerSelectionList
public class ServerSelectionList.OnlineServerEntry
extends ServerSelectionList.Entry
implements SelectableEntry
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FaviconTextureprivate static final intprivate byte @Nullable []private final Minecraftprivate final JoinMultiplayerScreenprivate final ServerDataprivate static final intprivate static final intprivate static final intprivate @Nullable Identifierprivate @Nullable ComponentFields inherited from class AbstractSelectionList.Entry
CONTENT_PADDING, list -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOnlineServerEntry(JoinMultiplayerScreen screen, ServerData serverData) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voiddrawIcon(GuiGraphics graphics, int rowLeft, int rowTop, Identifier location) voidjoin()booleankeyPressed(KeyEvent event) (package private) booleanmatches(ServerSelectionList.Entry other) booleanmouseClicked(MouseButtonEvent event, boolean doubleClick) private voidvoidrenderContent(GuiGraphics graphics, int mouseX, int mouseY, boolean hovered, float a) private voidswap(int currentIndex, int newIndex) voidprivate booleanuploadServerIcon(byte @Nullable [] serverIconBytes) Methods inherited from class ObjectSelectionList.Entry
updateNarrationMethods inherited from class AbstractSelectionList.Entry
getContentBottom, getContentHeight, getContentRight, getContentWidth, getContentX, getContentXMiddle, getContentY, getContentYMiddle, getHeight, getRectangle, getWidth, getX, getY, isFocused, isMouseOver, setFocused, setHeight, setWidth, setX, setY, visitWidgetsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GuiEventListener
charTyped, getBorderForArrowNavigation, getCurrentFocusPath, keyReleased, mouseDragged, mouseMoved, mouseReleased, mouseScrolled, nextFocusPath, shouldTakeFocusAfterInteractionMethods inherited from interface LayoutElement
setPositionMethods inherited from interface SelectableEntry
mouseOverBottomLeftQuarter, mouseOverBottomRightQuarter, mouseOverIcon, mouseOverLeftHalf, mouseOverRightHalf, mouseOverTopLeftQuarter, mouseOverTopRightQuarterMethods inherited from interface TabOrderedElement
getTabOrderGroup
-
Field Details
-
ICON_SIZE
private static final int ICON_SIZE- See Also:
-
SPACING
private static final int SPACING- See Also:
-
STATUS_ICON_WIDTH
private static final int STATUS_ICON_WIDTH- See Also:
-
STATUS_ICON_HEIGHT
private static final int STATUS_ICON_HEIGHT- See Also:
-
screen
-
minecraft
-
serverData
-
icon
-
lastIconBytes
private byte @Nullable [] lastIconBytes -
onlinePlayersTooltip
-
statusIcon
-
statusIconTooltip
-
-
Constructor Details
-
OnlineServerEntry
-
-
Method Details
-
renderContent
- Specified by:
renderContentin classAbstractSelectionList.Entry<ServerSelectionList.Entry>
-
refreshStatus
private void refreshStatus() -
updateServerList
public void updateServerList() -
drawIcon
-
uploadServerIcon
private boolean uploadServerIcon(byte @Nullable [] serverIconBytes) -
keyPressed
- Specified by:
keyPressedin interfaceGuiEventListener
-
join
public void join()- Specified by:
joinin classServerSelectionList.Entry
-
swap
private void swap(int currentIndex, int newIndex) -
mouseClicked
- Specified by:
mouseClickedin interfaceGuiEventListener- Overrides:
mouseClickedin classObjectSelectionList.Entry<ServerSelectionList.Entry>
-
getServerData
-
getNarration
- Specified by:
getNarrationin classObjectSelectionList.Entry<ServerSelectionList.Entry>
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classServerSelectionList.Entry
-
matches
- Specified by:
matchesin classServerSelectionList.Entry
-