Class RealmsUploadScreen

All Implemented Interfaces:
Drawable, Element, ParentElement, TickableElement

@Environment(CLIENT)
public class RealmsUploadScreen
extends RealmsScreen
  • Field Details

    • LOGGER

      private static final Logger LOGGER
    • UPLOAD_LOCK

      private static final ReentrantLock UPLOAD_LOCK
    • DOTS

      private static final String[] DOTS
    • field_26526

      private static final Text field_26526
    • parent

      private final RealmsResetWorldScreen parent
    • selectedLevel

      private final LevelSummary selectedLevel
    • worldId

      private final long worldId
    • slotId

      private final int slotId
    • uploadStatus

      private final UploadStatus uploadStatus
    • narrationRateLimiter

      private final RateLimiter narrationRateLimiter
    • field_20503

      private volatile Text[] field_20503
    • status

      private volatile Text status
    • progress

      private volatile String progress
    • cancelled

      private volatile boolean cancelled
    • uploadFinished

      private volatile boolean uploadFinished
    • showDots

      private volatile boolean showDots
    • uploadStarted

      private volatile boolean uploadStarted
    • backButton

      private ButtonWidget backButton
    • cancelButton

      private ButtonWidget cancelButton
    • animTick

      private int animTick
    • previousWrittenBytes

      private Long previousWrittenBytes
    • previousTimeSnapshot

      private Long previousTimeSnapshot
    • bytesPersSecond

      private long bytesPersSecond
    • field_22728

      private final Runnable field_22728
  • Constructor Details

  • Method Details

    • init

      public 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
    • removed

      public void removed()
      Overrides:
      removed in class Screen
    • onBack

      private void onBack()
    • onCancel

      private void onCancel()
    • keyPressed

      public boolean keyPressed​(int keyCode, int scanCode, int modifiers)
      Callback for when a key down event has been captured. The key code is identified by the constants in GLFW class.
      Specified by:
      keyPressed in interface Element
      Specified by:
      keyPressed in interface ParentElement
      Overrides:
      keyPressed in class Screen
      Parameters:
      keyCode - the named key code of the event as described in the GLFW class
      scanCode - the unique/platform-specific scan code of the keyboard input
      modifiers - a GLFW bitfield describing the modifier keys that are held down (see {@linkplain https://www.glfw.org/docs/3.3/group__mods.html GLFW Modifier key flags})
      Returns:
      true to indicate that the event handling is successful/valid
      See Also:
      Keyboard.onKey(long, int, int, int, int), GLFW.GLFW_KEY_Q, GLFWKeyCallbackI.invoke(long, int, int, int, int)
    • render

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

      private void drawDots​(MatrixStack matrixStack)
    • drawProgressBar

      private void drawProgressBar​(MatrixStack matrixStack)
    • drawUploadSpeed

      private void drawUploadSpeed​(MatrixStack matrixStack)
    • drawUploadSpeed0

      private void drawUploadSpeed0​(MatrixStack matrixStack, long long2)
    • tick

      public void tick()
      Specified by:
      tick in interface TickableElement
      Overrides:
      tick in class RealmsScreen
    • upload

      private void upload()
    • method_27460

      private void method_27460​(Text[] text)
    • uploadCancelled

      private void uploadCancelled()
    • verify

      private boolean verify​(File archive)
    • tarGzipArchive

      private File tarGzipArchive​(File pathToDirectoryFile) throws IOException
      Throws:
      IOException
    • addFileToTarGz

      private void addFileToTarGz​(TarArchiveOutputStream tOut, String path, String base, boolean root) throws IOException
      Throws:
      IOException