Class RealmsUploadScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable

public class RealmsUploadScreen extends RealmsScreen
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • UPLOAD_LOCK

      private static final ReentrantLock UPLOAD_LOCK
    • 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
    • callback

      private final Runnable callback
  • 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(PoseStack p_90096_, int p_90097_, int p_90098_, float p_90099_)
      Specified by:
      render in interface Renderable
      Overrides:
      render in class Screen
    • drawDots

      private void drawDots(PoseStack p_90116_)
    • drawProgressBar

      private void drawProgressBar(PoseStack p_90122_)
    • drawUploadSpeed

      private void drawUploadSpeed(PoseStack p_90125_)
    • drawUploadSpeed0

      private void drawUploadSpeed0(PoseStack p_90101_, long p_90102_)
    • 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