Class DeathScreen

All Implemented Interfaces:
Drawable, Element, ParentElement, TickableElement

@Environment(CLIENT)
public class DeathScreen
extends Screen
  • Field Details

    • ticksSinceDeath

      private int ticksSinceDeath
    • message

      private final Text message
    • isHardcore

      private final boolean isHardcore
    • field_26537

      private Text field_26537
  • Constructor Details

    • DeathScreen

      public DeathScreen​(@Nullable Text message, boolean isHardcore)
  • Method Details

    • init

      protected void init()
      Called when a screen should be initialized.

      This method is called when this screen is opened or resized.

      Overrides:
      init in class Screen
    • shouldCloseOnEsc

      public boolean shouldCloseOnEsc()
      Checks whether this screen should be closed when the escape key is pressed.
      Overrides:
      shouldCloseOnEsc in class Screen
    • onConfirmQuit

      private void onConfirmQuit​(boolean quit)
    • quitLevel

      private void quitLevel()
    • render

      public void render​(MatrixStack matrices, int mouseX, int mouseY, float delta)
      Specified by:
      render in interface Drawable
      Overrides:
      render in class Screen
    • getTextComponentUnderMouse

      @Nullable private Style getTextComponentUnderMouse​(int mouseX)
    • mouseClicked

      public boolean mouseClicked​(double mouseX, double mouseY, int button)
      Callback for when a mouse button down event has been captured. The button number is identified by the constants in GLFW class.
      Parameters:
      mouseX - the X coordinate of the mouse
      mouseY - the Y coordinate of the mouse
      button - the mouse button number
      Returns:
      true to indicate that the event handling is successful/valid
      See Also:
      Mouse.onMouseButton(long, int, int, int), GLFW.GLFW_MOUSE_BUTTON_1
    • isPauseScreen

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

      public void tick()
      Specified by:
      tick in interface TickableElement
      Overrides:
      tick in class Screen