Class ConnectScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement

public class ConnectScreen extends Screen
  • Field Details

    • UNIQUE_THREAD_ID

      private static final AtomicInteger UNIQUE_THREAD_ID
    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • NARRATION_DELAY_MS

      private static final long NARRATION_DELAY_MS
      See Also:
    • ABORT_CONNECTION

      public static final Component ABORT_CONNECTION
    • UNKNOWN_HOST_MESSAGE

      public static final Component UNKNOWN_HOST_MESSAGE
    • connection

      private volatile @Nullable Connection connection
    • channelFuture

      private @Nullable io.netty.channel.ChannelFuture channelFuture
    • aborted

      private volatile boolean aborted
    • parent

      private final Screen parent
    • status

      private Component status
    • lastNarration

      private long lastNarration
    • connectFailedTitle

      private final Component connectFailedTitle
  • Constructor Details

    • ConnectScreen

      private ConnectScreen(Screen parent, Component connectFailedTitle)
  • Method Details

    • startConnecting

      public static void startConnecting(Screen parent, Minecraft minecraft, ServerAddress hostAndPort, ServerData data, boolean isQuickPlay, @Nullable TransferState transferState)
    • connect

      private void connect(Minecraft minecraft, ServerAddress hostAndPort, ServerData server, @Nullable TransferState transferState)
    • updateStatus

      private void updateStatus(Component status)
    • tick

      public void tick()
      Overrides:
      tick in class Screen
    • shouldCloseOnEsc

      public boolean shouldCloseOnEsc()
      Overrides:
      shouldCloseOnEsc in class Screen
    • init

      protected void init()
      Overrides:
      init in class Screen
    • render

      public void render(GuiGraphics graphics, int mouseX, int mouseY, float a)
      Description copied from interface: Renderable
      Renders the graphical user interface (GUI) element.
      Specified by:
      render in interface Renderable
      Overrides:
      render in class Screen
      Parameters:
      graphics - the GuiGraphics object used for rendering.
      mouseX - the x-coordinate of the mouse cursor.
      mouseY - the y-coordinate of the mouse cursor.
      a - the partial tick time.