Class StatsScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement

public class StatsScreen extends Screen
  • Field Details

    • TITLE

      private static final Component TITLE
    • SLOT_SPRITE

      private static final Identifier SLOT_SPRITE
    • HEADER_SPRITE

      private static final Identifier HEADER_SPRITE
    • SORT_UP_SPRITE

      private static final Identifier SORT_UP_SPRITE
    • SORT_DOWN_SPRITE

      private static final Identifier SORT_DOWN_SPRITE
    • PENDING_TEXT

      private static final Component PENDING_TEXT
    • NO_VALUE_DISPLAY

      private static final Component NO_VALUE_DISPLAY
    • GENERAL_BUTTON

      private static final Component GENERAL_BUTTON
    • ITEMS_BUTTON

      private static final Component ITEMS_BUTTON
    • MOBS_BUTTON

      private static final Component MOBS_BUTTON
    • lastScreen

      protected final Screen lastScreen
    • LIST_WIDTH

      private static final int LIST_WIDTH
      See Also:
    • layout

      private final HeaderAndFooterLayout layout
    • tabManager

      private final TabManager tabManager
    • tabNavigationBar

      private @Nullable TabNavigationBar tabNavigationBar
    • stats

      private final StatsCounter stats
    • isLoading

      private boolean isLoading
      When true, the game will be paused when the gui is shown
  • Constructor Details

  • Method Details

    • init

      protected void init()
      Overrides:
      init in class Screen
    • onStatsUpdated

      public void onStatsUpdated()
    • setTabActiveStateAndTooltip

      private void setTabActiveStateAndTooltip(int index)
    • repositionElements

      protected void repositionElements()
      Overrides:
      repositionElements in class Screen
    • keyPressed

      public boolean keyPressed(KeyEvent event)
      Specified by:
      keyPressed in interface ContainerEventHandler
      Specified by:
      keyPressed in interface GuiEventListener
      Overrides:
      keyPressed in class Screen
    • render

      public void render(GuiGraphics graphics, int xm, int ym, 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.
      xm - the x-coordinate of the mouse cursor.
      ym - the y-coordinate of the mouse cursor.
      a - the partial tick time.
    • renderMenuBackground

      protected void renderMenuBackground(GuiGraphics graphics)
      Overrides:
      renderMenuBackground in class Screen
    • onClose

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

      private static String getTranslationKey(Stat<Identifier> stat)