Class RealmsDownloadLatestWorldScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement

public class RealmsDownloadLatestWorldScreen extends RealmsScreen
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • DOWNLOAD_LOCK

      private static final ReentrantLock DOWNLOAD_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:
    • lastScreen

      private final Screen lastScreen
    • worldDownload

      private final WorldDownload worldDownload
    • downloadTitle

      private final Component downloadTitle
    • narrationRateLimiter

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

      private Button cancelButton
    • worldName

      private final String worldName
    • downloadStatus

      private final RealmsDownloadLatestWorldScreen.DownloadStatus downloadStatus
    • errorMessage

      private volatile @Nullable Component errorMessage
    • status

      private volatile Component status
    • progress

      private volatile @Nullable String progress
    • cancelled

      private volatile boolean cancelled
    • showDots

      private volatile boolean showDots
    • finished

      private volatile boolean finished
    • extracting

      private volatile boolean extracting
    • previousWrittenBytes

      private @Nullable Long previousWrittenBytes
    • previousTimeSnapshot

      private @Nullable Long previousTimeSnapshot
    • bytesPersSecond

      private long bytesPersSecond
    • animTick

      private int animTick
    • DOTS

      private static final String[] DOTS
    • dotIndex

      private int dotIndex
    • checked

      private boolean checked
    • callback

      private final it.unimi.dsi.fastutil.booleans.BooleanConsumer callback
  • Constructor Details

    • RealmsDownloadLatestWorldScreen

      public RealmsDownloadLatestWorldScreen(Screen lastScreen, WorldDownload worldDownload, String worldName, it.unimi.dsi.fastutil.booleans.BooleanConsumer callback)
  • Method Details

    • init

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

      private void checkDownloadSize()
    • getContentLength

      private long getContentLength(String downloadLink)
    • tick

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

      private Component createProgressNarrationMessage()
    • onClose

      public void onClose()
      Overrides:
      onClose in class Screen
    • extractRenderState

      public void extractRenderState(GuiGraphicsExtractor graphics, int xm, int ym, float a)
      Specified by:
      extractRenderState in interface Renderable
      Overrides:
      extractRenderState in class Screen
    • extractDots

      private void extractDots(GuiGraphicsExtractor graphics)
    • extractProgressBar

      private void extractProgressBar(GuiGraphicsExtractor graphics)
    • extractDownloadSpeed

      private void extractDownloadSpeed(GuiGraphicsExtractor graphics)
    • extractDownloadSpeed0

      private void extractDownloadSpeed0(GuiGraphicsExtractor graphics, long bytesPerSecond)
    • downloadSave

      private void downloadSave()
    • downloadCancelled

      private void downloadCancelled()