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

      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

      @Nullable volatile Connection connection
    • channelFuture

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

      volatile boolean aborted
    • parent

      final Screen parent
    • status

      private Component status
    • lastNarration

      private long lastNarration
    • connectFailedTitle

      final Component connectFailedTitle
  • Constructor Details

    • ConnectScreen

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

    • startConnecting

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

      private void connect(Minecraft minecraft, ServerAddress serverAddress, ServerData serverData, @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 guiGraphics, int mouseX, int mouseY, float partialTick)
      Renders the graphical user interface (GUI) element.
      Specified by:
      render in interface Renderable
      Overrides:
      render in class Screen
      Parameters:
      guiGraphics - the GuiGraphics object used for rendering.
      mouseX - the x-coordinate of the mouse cursor.
      mouseY - the y-coordinate of the mouse cursor.
      partialTick - the partial tick time.