Package net.minecraft.client.gui.screens
Class WinScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.WinScreen
- All Implemented Interfaces:
ContainerEventHandler,GuiEventListener,Renderable,TabOrderedElement
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate it.unimi.dsi.fastutil.ints.IntSetprivate static final ResourceLocationprivate intprivate static final ResourceLocationprivate List<FormattedCharSequence> private static final org.slf4j.Loggerprivate final LogoRendererprivate static final Stringprivate static final Stringprivate final Runnableprivate final booleanprivate static final ResourceLocationprivate floatprivate floatprivate static final Componentprivate static final floatprivate static final floatprivate booleanprivate final it.unimi.dsi.fastutil.ints.IntSetprivate intprivate final floatprivate static final ResourceLocationFields inherited from class net.minecraft.client.gui.screens.Screen
FADE_IN_TIME, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, renderables, screenExecutor, title, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddCreditsFile(Reader p_232820_) private voidaddCreditsLine(Component pText, boolean pCentered, boolean pNarrate) private voidprivate voidaddPoemFile(Reader p_232818_) private voidaddPoemLines(String pText) private floatprotected voidinit()booleanbooleankeyPressed(int pKeyCode, int pScanCode, int pModifiers) Called when a keyboard key is pressed within the GUI element.booleankeyReleased(int pKeyCode, int pScanCode, int pModifiers) Called when a keyboard key is released within the GUI element.voidonClose()voidremoved()voidrender(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) Renders the graphical user interface (GUI) element.voidrenderBackground(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) protected voidrenderMenuBackground(GuiGraphics pGuiGraphics, int pX, int pY, int pWidth, int pHeight) private voidrenderVignette(GuiGraphics pGuiGraphics) private voidrespawn()voidtick()private voidwrapCreditsIO(ResourceLocation pLocation, WinScreen.CreditsReader pReader) Methods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, fadeWidgets, fillCrashDetails, findNarratableWidget, getFont, getMinecraft, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleClickEvent, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, onFilesDrop, rebuildWidgets, removeWidget, renderBlurredBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatusMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getBorderForArrowNavigation, mouseMovedMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
VIGNETTE_LOCATION
-
LOGGER
private static final org.slf4j.Logger LOGGER -
SECTION_HEADING
-
NAME_PREFIX
- See Also:
-
OBFUSCATE_TOKEN
-
SPEEDUP_FACTOR
private static final float SPEEDUP_FACTOR- See Also:
-
SPEEDUP_FACTOR_FAST
private static final float SPEEDUP_FACTOR_FAST- See Also:
-
END_POEM_LOCATION
-
CREDITS_LOCATION
-
POSTCREDITS_LOCATION
-
poem
private final boolean poem -
onFinished
-
scroll
private float scroll -
lines
-
narratorComponents
-
centeredLines
private it.unimi.dsi.fastutil.ints.IntSet centeredLines -
totalScrollLength
private int totalScrollLength -
speedupActive
private boolean speedupActive -
speedupModifiers
private final it.unimi.dsi.fastutil.ints.IntSet speedupModifiers -
scrollSpeed
private float scrollSpeed -
unmodifiedScrollSpeed
private final float unmodifiedScrollSpeed -
direction
private int direction -
logoRenderer
-
-
Constructor Details
-
WinScreen
-
-
Method Details
-
calculateScrollSpeed
private float calculateScrollSpeed() -
tick
public void tick() -
keyPressed
public boolean keyPressed(int pKeyCode, int pScanCode, int pModifiers) Called when a keyboard key is pressed within the GUI element.- Specified by:
keyPressedin interfaceContainerEventHandler- Specified by:
keyPressedin interfaceGuiEventListener- Overrides:
keyPressedin classScreen- Parameters:
pKeyCode- the key code of the pressed key.pScanCode- the scan code of the pressed key.pModifiers- the keyboard modifiers.- Returns:
trueif the event is consumed,falseotherwise.
-
keyReleased
public boolean keyReleased(int pKeyCode, int pScanCode, int pModifiers) Called when a keyboard key is released within the GUI element.- Parameters:
pKeyCode- the key code of the released key.pScanCode- the scan code of the released key.pModifiers- the keyboard modifiers.- Returns:
trueif the event is consumed,falseotherwise.
-
onClose
public void onClose() -
respawn
private void respawn() -
init
protected void init() -
getNarrationMessage
- Overrides:
getNarrationMessagein classScreen
-
wrapCreditsIO
-
addPoemFile
- Throws:
IOException
-
addCreditsFile
-
addEmptyLine
private void addEmptyLine() -
addPoemLines
-
addCreditsLine
-
render
Renders the graphical user interface (GUI) element.- Specified by:
renderin interfaceRenderable- Overrides:
renderin classScreen- Parameters:
pGuiGraphics- the GuiGraphics object used for rendering.pMouseX- the x-coordinate of the mouse cursor.pMouseY- the y-coordinate of the mouse cursor.pPartialTick- the partial tick time.
-
renderVignette
-
renderBackground
public void renderBackground(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) - Overrides:
renderBackgroundin classScreen
-
renderMenuBackground
protected void renderMenuBackground(GuiGraphics pGuiGraphics, int pX, int pY, int pWidth, int pHeight) - Overrides:
renderMenuBackgroundin classScreen
-
isPauseScreen
public boolean isPauseScreen()- Overrides:
isPauseScreenin classScreen
-
removed
public void removed() -
getBackgroundMusic
- Overrides:
getBackgroundMusicin classScreen
-