Class AuthScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
me.axieum.mcmod.authme.api.gui.screen.AuthScreen
- All Implemented Interfaces:
net.minecraft.client.gui.components.events.ContainerEventHandler,net.minecraft.client.gui.components.events.GuiEventListener,net.minecraft.client.gui.components.Renderable,net.minecraft.client.gui.components.TabOrderedElement
- Direct Known Subclasses:
MicrosoftAuthScreen,OfflineAuthScreen
public abstract class AuthScreen
extends net.minecraft.client.gui.screens.Screen
A screen for handling user authentication.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanTrue if the screen should be closed on success stat (via render thread).protected final net.minecraft.client.gui.screens.ScreenThe parent (or last) screen that opened this screen.protected booleanTrue if the login task completed successfully.protected final net.minecraft.client.gui.screens.ScreenThe screen to be returned to after a successful login.Fields 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, screenExecutor, title, width -
Constructor Summary
ConstructorsConstructorDescriptionAuthScreen(net.minecraft.network.chat.Component title, net.minecraft.client.gui.screens.Screen parentScreen, net.minecraft.client.gui.screens.Screen successScreen) Constructs a new authentication screen. -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidcenterPosition(net.minecraft.client.gui.layouts.LayoutElement element, net.minecraft.client.gui.screens.Screen screen, int xOffset, int yOffset) Centers the position of a LayoutElement.protected voidinit()voidonClose()voidtick()Methods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, canInterruptWithAnotherScreen, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, fadeWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleClickEvent, handleComponentClicked, handleDelayedNarration, init, insertText, isAllowedInPortal, isInGameUi, isMouseOver, isPauseScreen, isValidCharacterForName, keyPressed, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removed, removeWidget, render, renderBackground, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltipAndSubtitles, 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, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getBorderForArrowNavigation, mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
parentScreen
protected final net.minecraft.client.gui.screens.Screen parentScreenThe parent (or last) screen that opened this screen. -
successScreen
protected final net.minecraft.client.gui.screens.Screen successScreenThe screen to be returned to after a successful login. -
success
protected boolean successTrue if the login task completed successfully. -
closeOnSuccess
protected boolean closeOnSuccessTrue if the screen should be closed on success stat (via render thread).
-
-
Constructor Details
-
AuthScreen
public AuthScreen(net.minecraft.network.chat.Component title, net.minecraft.client.gui.screens.Screen parentScreen, net.minecraft.client.gui.screens.Screen successScreen) Constructs a new authentication screen.- Parameters:
title- screen titleparentScreen- parent (or last) screen that opened this screensuccessScreen- screen to be returned to after a successful login
-
-
Method Details
-
init
protected void init()- Overrides:
initin classnet.minecraft.client.gui.screens.Screen
-
tick
public void tick()- Overrides:
tickin classnet.minecraft.client.gui.screens.Screen
-
onClose
public void onClose()- Overrides:
onClosein classnet.minecraft.client.gui.screens.Screen
-
centerPosition
protected static void centerPosition(net.minecraft.client.gui.layouts.LayoutElement element, net.minecraft.client.gui.screens.Screen screen, int xOffset, int yOffset) Centers the position of a LayoutElement.- Parameters:
element- the LayoutElement to center.screen- the Screen to center the element in.xOffset- the horizontal offset to be applied.yOffset- the vertical offset to be applied.
-