Class RealmsUploadScreen

All Implemented Interfaces:
IGuiEventListener, INestedGuiEventHandler, IRenderable, IScreen

public class RealmsUploadScreen extends RealmsScreen
  • Field Details

    • LOGGER

      private static final org.apache.logging.log4j.Logger LOGGER
    • UPLOAD_LOCK

      private static final ReentrantLock UPLOAD_LOCK
    • DOTS

      private static final String[] DOTS
    • VERIFYING_TEXT

      private static final ITextComponent VERIFYING_TEXT
    • lastScreen

      private final RealmsResetWorldScreen lastScreen
    • selectedLevel

      private final WorldSummary 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

      private volatile ITextComponent[] errorMessage
    • status

      private volatile ITextComponent 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

      private Long previousWrittenBytes
    • previousTimeSnapshot

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

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

      private void onBack()
    • onCancel

      private void onCancel()
    • keyPressed

      public boolean keyPressed(int p_231046_1_, int p_231046_2_, int p_231046_3_)
      Specified by:
      keyPressed in interface IGuiEventListener
      Specified by:
      keyPressed in interface INestedGuiEventHandler
      Overrides:
      keyPressed in class Screen
    • render

      public void render(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_)
      Specified by:
      render in interface IRenderable
      Overrides:
      render in class Screen
    • drawDots

      private void drawDots(MatrixStack p_238086_1_)
    • drawProgressBar

      private void drawProgressBar(MatrixStack p_238088_1_)
    • drawUploadSpeed

      private void drawUploadSpeed(MatrixStack p_238089_1_)
    • drawUploadSpeed0

      private void drawUploadSpeed0(MatrixStack p_238083_1_, long p_238083_2_)
    • tick

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

      private void upload()
    • setErrorMessage

      private void setErrorMessage(ITextComponent... p_238085_1_)
    • uploadCancelled

      private void uploadCancelled()
    • verify

      private boolean verify(File p_224692_1_)
    • tarGzipArchive

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

      private void addFileToTarGz(org.apache.commons.compress.archivers.tar.TarArchiveOutputStream p_224669_1_, String p_224669_2_, String p_224669_3_, boolean p_224669_4_) throws IOException
      Throws:
      IOException