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

      @Nullable private TextureAtlasSprite cachedNetherPortalSprite
    • COLORS

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

  • Method Details

    • update

      public void update(LevelLoadTracker pLaodTracker, LevelLoadingScreen.Reason pReason)
    • shouldCloseOnEsc

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

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

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

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

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

      private void drawProgressBar(GuiGraphics pGuiGraphics, int pX, int pY, int pWidth, int pHeight, float pProgress)
    • renderChunks

      public static void renderChunks(GuiGraphics pGuiGraphics, int pX, int pY, int pSize, int pSpacing, ChunkLoadStatusView pStatusView)
    • renderBackground

      public void renderBackground(GuiGraphics p_433649_, int p_434938_, int p_434020_, float p_432747_)
      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