Class LevelLoadingScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement

public class LevelLoadingScreen extends Screen
  • Field Details

    • DOWNLOADING_TERRAIN_TEXT

      private static final Component DOWNLOADING_TERRAIN_TEXT
    • READY_TO_PLAY_TEXT

      private static final Component READY_TO_PLAY_TEXT
    • NARRATION_DELAY_MS

      private static final long NARRATION_DELAY_MS
      See Also:
    • PROGRESS_BAR_WIDTH

      private static final int PROGRESS_BAR_WIDTH
      See Also:
    • loadTracker

      private LevelLoadTracker loadTracker
    • smoothedProgress

      private float smoothedProgress
    • lastNarration

      private long lastNarration
    • reason

      private LevelLoadingScreen.Reason reason
    • cachedNetherPortalSprite

      private @Nullable TextureAtlasSprite cachedNetherPortalSprite
    • COLORS

      private static final it.unimi.dsi.fastutil.objects.Object2IntMap<ChunkStatus> COLORS
  • Constructor Details

  • Method Details

    • update

      public void update(LevelLoadTracker loadTracker, LevelLoadingScreen.Reason reason)
    • shouldCloseOnEsc

      public boolean shouldCloseOnEsc()
      Overrides:
      shouldCloseOnEsc in class Screen
    • shouldNarrateNavigation

      protected boolean shouldNarrateNavigation()
      Overrides:
      shouldNarrateNavigation in class Screen
    • updateNarratedWidget

      protected void updateNarratedWidget(NarrationElementOutput output)
      Overrides:
      updateNarratedWidget in class Screen
    • tick

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

      public void render(GuiGraphics graphics, int mouseX, int mouseY, float a)
      Description copied from interface: Renderable
      Renders the graphical user interface (GUI) element.
      Specified by:
      render in interface Renderable
      Overrides:
      render in class Screen
      Parameters:
      graphics - the GuiGraphics object used for rendering.
      mouseX - the x-coordinate of the mouse cursor.
      mouseY - the y-coordinate of the mouse cursor.
      a - the partial tick time.
    • drawProgressBar

      private void drawProgressBar(GuiGraphics graphics, int left, int top, int width, int height, float progress)
    • renderChunks

      public static void renderChunks(GuiGraphics graphics, int xCenter, int yCenter, int size, int margin, ChunkLoadStatusView statusView)
    • renderBackground

      public void renderBackground(GuiGraphics graphics, int mouseX, int mouseY, float a)
      Overrides:
      renderBackground in class Screen
    • getNetherPortalSprite

      private TextureAtlasSprite getNetherPortalSprite()
    • onClose

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

      public boolean isPauseScreen()
      Overrides:
      isPauseScreen in class Screen