Class MultiplayerServerListWidget.LanServerEntry

All Implemented Interfaces:
Element
Enclosing class:
MultiplayerServerListWidget

@Environment(CLIENT)
public static class MultiplayerServerListWidget.LanServerEntry
extends MultiplayerServerListWidget.Entry
  • Field Details

    • TITLE_TEXT

      private static final Text TITLE_TEXT
    • HIDDEN_ADDRESS_TEXT

      private static final Text HIDDEN_ADDRESS_TEXT
    • screen

      private final MultiplayerScreen screen
    • client

      protected final MinecraftClient client
    • server

      protected final LanServerInfo server
    • time

      private long time
  • Constructor Details

  • Method Details

    • render

      public void render​(MatrixStack matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta)
      Renders an entry in a list.
      Specified by:
      render in class EntryListWidget.Entry<MultiplayerServerListWidget.Entry>
      Parameters:
      matrices - the matrix stack used for rendering
      index - the index of the entry
      y - the Y coordinate of the entry
      x - the X coordinate of the entry
      entryWidth - the width of the entry
      entryHeight - the height of the entry
      mouseX - the X coordinate of the mouse
      mouseY - the Y coordinate of the mouse
      hovered - whether the mouse is hovering over the entry
    • mouseClicked

      public boolean mouseClicked​(double mouseX, double mouseY, int button)
      Callback for when a mouse button down event has been captured. The button number is identified by the constants in GLFW class.
      Parameters:
      mouseX - the X coordinate of the mouse
      mouseY - the Y coordinate of the mouse
      button - the mouse button number
      Returns:
      true to indicate that the event handling is successful/valid
      See Also:
      Mouse.onMouseButton(long, int, int, int), GLFW.GLFW_MOUSE_BUTTON_1
    • getLanServerEntry

      public LanServerInfo getLanServerEntry()