Class DeathScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement

public class DeathScreen extends Screen
  • Field Details

    • TITLE_SCALE

      private static final int TITLE_SCALE
      See Also:
    • DRAFT_REPORT_SPRITE

      private static final Identifier DRAFT_REPORT_SPRITE
    • delayTicker

      private int delayTicker
      The integer value containing the number of ticks that have passed since the player's death
    • causeOfDeath

      private final @Nullable Component causeOfDeath
    • hardcore

      private final boolean hardcore
    • player

      private final LocalPlayer player
    • deathScore

      private final Component deathScore
    • exitButtons

      private final List<Button> exitButtons
    • exitToTitleButton

      private @Nullable Button exitToTitleButton
  • Constructor Details

    • DeathScreen

      public DeathScreen(@Nullable Component causeOfDeath, boolean hardcore, LocalPlayer player)
  • Method Details

    • init

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

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

      private void handleExitToTitleScreen()
    • exitToTitleScreen

      private void exitToTitleScreen()
    • 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.
    • visitText

      private void visitText(ActiveTextCollector output)
    • renderBackground

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

      private static void renderDeathBackground(GuiGraphics graphics, int width, int height)
    • mouseClicked

      public boolean mouseClicked(MouseButtonEvent event, boolean doubleClick)
    • isPauseScreen

      public boolean isPauseScreen()
      Overrides:
      isPauseScreen in class Screen
    • isAllowedInPortal

      public boolean isAllowedInPortal()
      Overrides:
      isAllowedInPortal in class Screen
    • tick

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

      private void setButtonsActive(boolean isActive)