Class DeathScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement

public class DeathScreen extends Screen
  • Field Details

    • DRAFT_REPORT_SPRITE

      private static final ResourceLocation 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 Component causeOfDeath
    • hardcore

      private final boolean hardcore
    • deathScore

      private Component deathScore
    • exitButtons

      private final List<Button> exitButtons
    • exitToTitleButton

      @Nullable private Button exitToTitleButton
  • Constructor Details

    • DeathScreen

      public DeathScreen(@Nullable Component pCauseOfDeath, boolean pHardcore)
  • 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 p_283488_, int p_283551_, int p_283002_, float p_281981_)
      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_283488_ - the GuiGraphics object used for rendering.
      p_283551_ - the x-coordinate of the mouse cursor.
      p_283002_ - the y-coordinate of the mouse cursor.
      p_281981_ - the partial tick time.
    • renderBackground

      public void renderBackground(GuiGraphics p_296411_, int p_295765_, int p_295221_, float p_295625_)
      Overrides:
      renderBackground in class Screen
    • renderDeathBackground

      static void renderDeathBackground(GuiGraphics pGuiGraphics, int pWidth, int pHeight)
    • getClickedComponentStyleAt

      @Nullable private Style getClickedComponentStyleAt(int pX)
    • mouseClicked

      public boolean mouseClicked(MouseButtonEvent p_446287_, boolean p_433128_)
    • 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 pActive)