Class RealmsDownloadLatestWorldScreen

All Implemented Interfaces:
IGuiEventListener, INestedGuiEventHandler, IRenderable, IScreen

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 ITextComponent 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 ITextComponent errorMessage
    • status

      private volatile ITextComponent 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_i232203_1_, WorldDownload p_i232203_2_, String p_i232203_3_, it.unimi.dsi.fastutil.booleans.BooleanConsumer p_i232203_4_)
  • Method Details

    • init

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

      private void checkDownloadSize()
    • getContentLength

      private long getContentLength(String p_224152_1_)
    • tick

      public void tick()
      Specified by:
      tick in interface IScreen
      Overrides:
      tick in class RealmsScreen
    • 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
    • backButtonClicked

      private void backButtonClicked()
    • 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_237835_1_)
    • drawProgressBar

      private void drawProgressBar(MatrixStack p_237836_1_)
    • drawDownloadSpeed

      private void drawDownloadSpeed(MatrixStack p_237838_1_)
    • drawDownloadSpeed0

      private void drawDownloadSpeed0(MatrixStack p_237833_1_, long p_237833_2_)
    • downloadSave

      private void downloadSave()
    • downloadCancelled

      private void downloadCancelled()