Class RealmsUploadScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement

public class RealmsUploadScreen extends RealmsScreen
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • UPLOAD_LOCK

      private static final ReentrantLock UPLOAD_LOCK
    • BAR_WIDTH

      private static final int BAR_WIDTH
      See Also:
    • BAR_TOP

      private static final int BAR_TOP
      See Also:
    • BAR_BOTTOM

      private static final int BAR_BOTTOM
      See Also:
    • BAR_BORDER

      private static final int BAR_BORDER
      See Also:
    • DOTS

      private static final String[] DOTS
    • VERIFYING_TEXT

      private static final Component VERIFYING_TEXT
    • lastScreen

      private final RealmsResetWorldScreen lastScreen
    • selectedLevel

      private final LevelSummary selectedLevel
    • worldId

      private final long worldId
    • slotId

      private final int slotId
    • uploadStatus

      private final UploadStatus uploadStatus
    • narrationRateLimiter

      private final com.google.common.util.concurrent.RateLimiter narrationRateLimiter
    • errorMessage

      @Nullable private volatile Component[] errorMessage
    • status

      private volatile Component 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 Button backButton
    • cancelButton

      private Button cancelButton
    • tickCount

      private int tickCount
    • previousWrittenBytes

      @Nullable private Long previousWrittenBytes
    • previousTimeSnapshot

      @Nullable private Long previousTimeSnapshot
    • bytesPersSecond

      private long bytesPersSecond
  • Constructor Details

  • Method Details

    • init

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

      private void onBack()
    • onCancel

      private void onCancel()
    • keyPressed

      public boolean keyPressed(int p_90089_, int p_90090_, int p_90091_)
      Specified by:
      keyPressed in interface ContainerEventHandler
      Specified by:
      keyPressed in interface GuiEventListener
      Overrides:
      keyPressed in class Screen
    • render

      public void render(GuiGraphics p_282140_, int p_90097_, int p_90098_, float p_90099_)
      Specified by:
      render in interface Renderable
      Overrides:
      render in class Screen
    • drawDots

      private void drawDots(GuiGraphics p_283121_)
    • drawProgressBar

      private void drawProgressBar(GuiGraphics p_282575_)
    • drawUploadSpeed

      private void drawUploadSpeed(GuiGraphics p_281884_)
    • drawUploadSpeed0

      private void drawUploadSpeed0(GuiGraphics p_282279_, long p_282827_)
    • tick

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

      private Component createProgressNarrationMessage()
    • upload

      private void upload()
    • setErrorMessage

      private void setErrorMessage(Component... p_90113_)
    • uploadCancelled

      private void uploadCancelled()
    • verify

      private boolean verify(File p_90106_)
    • tarGzipArchive

      private File tarGzipArchive(File p_90120_) throws IOException
      Throws:
      IOException
    • addFileToTarGz

      private void addFileToTarGz(org.apache.commons.compress.archivers.tar.TarArchiveOutputStream p_90108_, String p_90109_, String p_90110_, boolean p_90111_) throws IOException
      Throws:
      IOException