Class ConnectScreen

All Implemented Interfaces:
Drawable, Element, ParentElement, TickableElement

@Environment(CLIENT)
public class ConnectScreen
extends Screen
  • Field Details

    • CONNECTOR_THREADS_COUNT

      private static final AtomicInteger CONNECTOR_THREADS_COUNT
    • LOGGER

      private static final Logger LOGGER
    • connection

      private ClientConnection connection
    • connectingCancelled

      private boolean connectingCancelled
    • parent

      private final Screen parent
    • status

      private Text status
    • narratorTimer

      private long narratorTimer
  • Constructor Details

  • Method Details

    • connect

      private void connect​(String address, int port)
    • setStatus

      private void setStatus​(Text status)
    • tick

      public void tick()
      Specified by:
      tick in interface TickableElement
      Overrides:
      tick in class Screen
    • shouldCloseOnEsc

      public boolean shouldCloseOnEsc()
      Checks whether this screen should be closed when the escape key is pressed.
      Overrides:
      shouldCloseOnEsc in class Screen
    • init

      protected void init()
      Called when a screen should be initialized.

      This method is called when this screen is opened or resized.

      Overrides:
      init in class Screen
    • render

      public void render​(MatrixStack matrices, int mouseX, int mouseY, float delta)
      Specified by:
      render in interface Drawable
      Overrides:
      render in class Screen