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 RateLimiter narrationRateLimiter
    • cancelButton

      private Button cancelButton
    • worldName

      private final String worldName
    • downloadStatus

      private final RealmsDownloadLatestWorldScreen.DownloadStatus downloadStatus
    • errorMessage

      @Nullable private volatile Component errorMessage
    • status

      private volatile Component status
    • progress

      @Nullable 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

      @Nullable private Long previousWrittenBytes
    • previousTimeSnapshot

      @Nullable 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 pLastScreen, WorldDownload pWorldDownload, String pWorldName, it.unimi.dsi.fastutil.booleans.BooleanConsumer pCallback)
  • Method Details

    • init

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

      private void checkDownloadSize()
    • getContentLength

      private long getContentLength(String pUri)
    • tick

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

      private Component createProgressNarrationMessage()
    • onClose

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

      public void render(GuiGraphics p_282124_, int p_88635_, int p_88636_, float p_88637_)
      Description copied from class: Screen
      Neo: mixins targeting this method won't fire for container screens as AbstractContainerScreen.render(net.minecraft.client.gui.GuiGraphics, int, int, float) replicates this method in place of a super call to insert an event
      Specified by:
      render in interface Renderable
      Overrides:
      render in class Screen
      Parameters:
      p_282124_ - the GuiGraphics object used for rendering.
      p_88635_ - the x-coordinate of the mouse cursor.
      p_88636_ - the y-coordinate of the mouse cursor.
      p_88637_ - the partial tick time.
    • drawDots

      private void drawDots(GuiGraphics pGuiGraphics)
    • drawProgressBar

      private void drawProgressBar(GuiGraphics pGuiGraphics)
    • drawDownloadSpeed

      private void drawDownloadSpeed(GuiGraphics pGuiGraphics)
    • drawDownloadSpeed0

      private void drawDownloadSpeed0(GuiGraphics pGuiGraphics, long pBytesPerSecond)
    • downloadSave

      private void downloadSave()
    • downloadCancelled

      private void downloadCancelled()