Package net.minecraft.client.gui.screen
Class DeathScreen
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.AbstractParentElement
net.minecraft.client.gui.screen.Screen
net.minecraft.client.gui.screen.DeathScreen
- All Implemented Interfaces:
Drawable,Element,ParentElement,TickableElement
@Environment(CLIENT) public class DeathScreen extends Screen
-
Field Summary
Fields Modifier and Type Field Description private booleanisHardcoreprivate Textmessageprivate Textscoreprivate intticksSinceDeathFields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, widthFields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE -
Constructor Summary
Constructors Constructor Description DeathScreen(Text message, boolean isHardcore) -
Method Summary
Modifier and Type Method Description private StylegetTextComponentUnderMouse(int mouseX)protected voidinit()Called when a screen should be initialized.booleanisPauseScreen()booleanmouseClicked(double mouseX, double mouseY, int button)Callback for when a mouse button down event has been captured.private voidonConfirmQuit(boolean quit)private voidquitLevel()voidrender(MatrixStack matrices, int mouseX, int mouseY, float delta)booleanshouldCloseOnEsc()Checks whether this screen should be closed when the escape key is pressed.voidtick()Methods inherited from class net.minecraft.client.gui.screen.Screen
addButton, addChild, children, filesDragged, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, keyPressed, onClose, removed, renderBackground, renderBackground, renderBackgroundTexture, renderOrderedTooltip, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocusedMethods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, method_33284, setZOffsetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.Element
mouseMovedMethods inherited from interface net.minecraft.client.gui.ParentElement
changeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
Field Details
-
ticksSinceDeath
private int ticksSinceDeath -
message
-
isHardcore
private final boolean isHardcore -
score
-
-
Constructor Details
-
DeathScreen
-
-
Method Details
-
init
protected void init()Called when a screen should be initialized.This method is called when this screen is opened or resized.
-
shouldCloseOnEsc
public boolean shouldCloseOnEsc()Checks whether this screen should be closed when the escape key is pressed.- Overrides:
shouldCloseOnEscin classScreen
-
onConfirmQuit
private void onConfirmQuit(boolean quit) -
quitLevel
private void quitLevel() -
render
-
getTextComponentUnderMouse
-
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 inGLFWclass.- Parameters:
mouseX- the X coordinate of the mousemouseY- the Y coordinate of the mousebutton- the mouse button number- Returns:
trueto 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:
isPauseScreenin classScreen
-
tick
public void tick()- Specified by:
tickin interfaceTickableElement- Overrides:
tickin classScreen
-