Class RealmsDownloadLatestWorldScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Widget

public class RealmsDownloadLatestWorldScreen extends RealmsScreen
  • Field Details

    • LOGGER

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

      private static final ReentrantLock DOWNLOAD_LOCK
    • 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 Component errorMessage
    • status

      private volatile Component status
    • progress

      private volatile String progress
    • cancelled

      private volatile boolean cancelled
    • showDots

      private volatile boolean showDots
    • finished

      private volatile boolean finished
    • extracting

      private volatile boolean extracting
    • previousWrittenBytes

      private Long previousWrittenBytes
    • previousTimeSnapshot

      private 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 p_88625_, WorldDownload p_88626_, String p_88627_, it.unimi.dsi.fastutil.booleans.BooleanConsumer p_88628_)
  • Method Details

    • init

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

      private void checkDownloadSize()
    • getContentLength

      private long getContentLength(String p_88647_)
    • tick

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

      private Component createProgressNarrationMessage()
    • keyPressed

      public boolean keyPressed(int p_88630_, int p_88631_, int p_88632_)
      Specified by:
      keyPressed in interface ContainerEventHandler
      Specified by:
      keyPressed in interface GuiEventListener
      Overrides:
      keyPressed in class Screen
    • backButtonClicked

      private void backButtonClicked()
    • render

      public void render(PoseStack p_88634_, int p_88635_, int p_88636_, float p_88637_)
      Specified by:
      render in interface Widget
      Overrides:
      render in class Screen
    • drawDots

      private void drawDots(PoseStack p_88645_)
    • drawProgressBar

      private void drawProgressBar(PoseStack p_88649_)
    • drawDownloadSpeed

      private void drawDownloadSpeed(PoseStack p_88654_)
    • drawDownloadSpeed0

      private void drawDownloadSpeed0(PoseStack p_88639_, long p_88640_)
    • downloadSave

      private void downloadSave()
    • downloadCancelled

      private void downloadCancelled()