Package com.mojang.realmsclient
Class RealmsMainScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.realms.RealmsScreen
com.mojang.realmsclient.RealmsMainScreen
- All Implemented Interfaces:
ContainerEventHandler,GuiEventListener,Renderable,TabOrderedElement
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class(package private) static class(package private) class(package private) static enum(package private) static class(package private) class(package private) class(package private) static interface(package private) class(package private) classNested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate RealmsMainScreen.LayoutStateprivate Buttonprivate final CompletableFuture<RealmsAvailability.Result> (package private) List<RealmsServer> private Buttonprivate static final intprivate static final intprivate static final int(package private) static final ResourceLocationprivate static final Componentprivate Buttonprivate static final intprivate DataFetcher.Subscription(package private) static final ResourceLocation(package private) static final ResourceLocationprivate static final intstatic final ResourceLocationprivate static final intprivate static final Componentprivate static final Component(package private) static final ResourceLocationprivate static final ResourceLocationprivate final RateLimiterprivate final Screenprivate HeaderAndFooterLayoutprivate static final Componentprivate Buttonprivate static final Component(package private) static final org.slf4j.Loggerprivate static final int(package private) static final ResourceLocationprivate static final intprivate static final intprivate static final ResourceLocationprivate Stringprivate static final Componentprivate static final ResourceLocationprivate static final Component(package private) final List<RealmsNotification> (package private) RealmsServerPlayerLists(package private) static final ResourceLocationprivate static final Componentprivate static final Componentprivate Button(package private) RealmsMainScreen.RealmSelectionListprivate static booleanprivate Button(package private) static final Component(package private) static final Component(package private) static final Component(package private) static final Component(package private) static final Component(package private) static final Component(package private) RealmsServerListprivate static final booleanprivate static boolean(package private) static final Componentprivate static final Componentprivate static final Component(package private) static final Componentprivate boolean(package private) static final ComponentFields inherited from class net.minecraft.realms.RealmsScreen
COLOR_DARK_GRAY, COLOR_GREEN, COLOR_LINK, COLOR_LINK_HOVER, COLOR_MEDIUM_GRAY, EXPIRATION_NOTIFICATION_DAYS, HARDCORE_HEART_SIZE, LOGO_HEIGHT, LOGO_LOCATION, LOGO_TEXTURE_HEIGHT, LOGO_TEXTURE_WIDTH, LOGO_WIDTH, SIZE_LIMIT, SKIN_FACE_SIZE, TITLE_HEIGHTFields 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, width -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> voidcallRealmsClient(RealmsMainScreen.RealmsCall<T> pCall, Consumer<T> pOnFinish) private voidconfigureClicked(RealmsServer pRealmsServer) private static voidconfirmToPlay(RealmsServer pRealmsServer, Screen pLastScreen, Component pTitle, Component pMessage, Component pConfirmButton) private LayoutcreateFooter(RealmsMainScreen.LayoutState pLayoutState) private Layoutprivate HeaderAndFooterLayoutcreateLayout(RealmsMainScreen.LayoutState pLayoutState) private LinearLayoutprivate void(package private) voiddismissNotification(UUID pUuid) static ComponentgetGameModeComponent(int pGamemode, boolean pHardcore) private RealmsServerstatic ComponentgetVersionComponent(String pVersion, boolean pCompatible) static ComponentgetVersionComponent(String pVersion, int pColor) voidinit()private DataFetcher.SubscriptioninitDataFetcher(RealmsDataFetcher pDataFetcher) private booleanisSelfOwnedNonExpiredServer(RealmsServer pServer) (package private) static booleanisSelfOwnedServer(RealmsServer pServer) static booleanprivate voidleaveClicked(RealmsServer pRealmsServer) private voidleaveServer(RealmsServer pServer) (package private) voidmarkNotificationsAsSeen(Collection<RealmsNotification> pNotifications) voidonClose()private voidonRenew(RealmsServer pRealmsServer) private voidprivate voidstatic voidplay(RealmsServer pRealmsServer, Screen pLastScreen) static voidplay(RealmsServer pRealmsServer, Screen pLastScreen, boolean pAllowSnapshots) private voidstatic voidstatic voidvoidrender(GuiGraphics p_282736_, int p_283347_, int p_282480_, float p_283485_) Renders the graphical user interface (GUI) element.private voidrenderEnvironment(GuiGraphics pGuiGraphics, String pText, int pColor) protected voidvoidprivate booleanshouldConfigureButtonBeActive(RealmsServer pRealmsServer) private booleanshouldLeaveButtonBeActive(RealmsServer pRealmsServer) private booleanshouldRenewButtonBeActive(RealmsServer pRealmsServer) voidtick()(package private) voidprivate voidprivate voidupdateLayout(RealmsMainScreen.LayoutState pLayoutState) private static voidupgradeRealmAndPlay(RealmsServer pServer, Screen pLastScreen) Methods inherited from class net.minecraft.realms.RealmsScreen
addLabel, createLabelNarration, realmsLogo, rowMethods 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, getMinecraft, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleClickEvent, handleComponentClicked, handleDelayedNarration, init, insertText, isAllowedInPortal, isInGameUi, isMouseOver, isPauseScreen, isValidCharacterForName, keyPressed, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removed, removeWidget, renderBackground, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltipAndSubtitles, 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
-
INFO_SPRITE
-
NEW_REALM_SPRITE
-
EXPIRED_SPRITE
-
EXPIRES_SOON_SPRITE
-
OPEN_SPRITE
-
CLOSED_SPRITE
-
INVITE_SPRITE
-
NEWS_SPRITE
-
HARDCORE_MODE_SPRITE
-
LOGGER
static final org.slf4j.Logger LOGGER -
NO_REALMS_LOCATION
-
TITLE
-
LOADING_TEXT
-
SERVER_UNITIALIZED_TEXT
-
SUBSCRIPTION_EXPIRED_TEXT
-
SUBSCRIPTION_RENEW_TEXT
-
TRIAL_EXPIRED_TEXT
-
PLAY_TEXT
-
LEAVE_SERVER_TEXT
-
CONFIGURE_SERVER_TEXT
-
SERVER_EXPIRED_TOOLTIP
-
SERVER_EXPIRES_SOON_TOOLTIP
-
SERVER_EXPIRES_IN_DAY_TOOLTIP
-
SERVER_OPEN_TOOLTIP
-
SERVER_CLOSED_TOOLTIP
-
UNITIALIZED_WORLD_NARRATION
-
NO_REALMS_TEXT
-
NO_PENDING_INVITES
-
PENDING_INVITES
-
INCOMPATIBLE_POPUP_TITLE
-
INCOMPATIBLE_RELEASE_TYPE_POPUP_MESSAGE
-
BUTTON_WIDTH
private static final int BUTTON_WIDTH- See Also:
-
BUTTON_COLUMNS
private static final int BUTTON_COLUMNS- See Also:
-
BUTTON_SPACING
private static final int BUTTON_SPACING- See Also:
-
CONTENT_WIDTH
private static final int CONTENT_WIDTH- See Also:
-
LOGO_PADDING
private static final int LOGO_PADDING- See Also:
-
HEADER_HEIGHT
private static final int HEADER_HEIGHT- See Also:
-
FOOTER_PADDING
private static final int FOOTER_PADDING- See Also:
-
NEW_REALM_SPRITE_WIDTH
private static final int NEW_REALM_SPRITE_WIDTH- See Also:
-
NEW_REALM_SPRITE_HEIGHT
private static final int NEW_REALM_SPRITE_HEIGHT- See Also:
-
SNAPSHOT
private static final boolean SNAPSHOT -
snapshotToggle
private static boolean snapshotToggle -
availability
-
dataSubscription
-
handledSeenNotifications
-
regionsPinged
private static boolean regionsPinged -
inviteNarrationLimiter
-
lastScreen
-
playButton
-
backButton
-
renewButton
-
configureButton
-
leaveButton
-
realmSelectionList
RealmsMainScreen.RealmSelectionList realmSelectionList -
serverList
RealmsServerList serverList -
availableSnapshotServers
List<RealmsServer> availableSnapshotServers -
onlinePlayersPerRealm
RealmsServerPlayerLists onlinePlayersPerRealm -
trialsAvailable
private volatile boolean trialsAvailable -
newsLink
-
notifications
-
addRealmButton
-
pendingInvitesButton
-
newsButton
-
activeLayoutState
-
layout
-
-
Constructor Details
-
RealmsMainScreen
-
-
Method Details
-
init
public void init() -
isSnapshot
public static boolean isSnapshot() -
repositionElements
protected void repositionElements()- Overrides:
repositionElementsin classScreen
-
onClose
public void onClose() -
updateLayout
private void updateLayout() -
updateLayout
-
createLayout
-
createHeader
-
createNoRealmsContent
-
updateButtonStates
void updateButtonStates() -
shouldRenewButtonBeActive
-
shouldConfigureButtonBeActive
-
shouldLeaveButtonBeActive
-
tick
public void tick() -
refreshPendingInvites
public static void refreshPendingInvites() -
refreshServerList
public static void refreshServerList() -
debugRefreshDataFetchers
private void debugRefreshDataFetchers() -
initDataFetcher
-
markNotificationsAsSeen
-
callRealmsClient
private static <T> void callRealmsClient(RealmsMainScreen.RealmsCall<T> pCall, Consumer<T> pOnFinish) -
refreshListAndLayout
private void refreshListAndLayout() -
pingRegions
private void pingRegions() -
getOwnedNonExpiredRealmIds
-
onRenew
-
configureClicked
-
leaveClicked
-
getSelectedServer
-
leaveServer
-
dismissNotification
-
resetScreen
public void resetScreen() -
getNarrationMessage
- Overrides:
getNarrationMessagein classScreen
-
render
Description copied from interface:RenderableRenders the graphical user interface (GUI) element.- Specified by:
renderin interfaceRenderable- Overrides:
renderin classScreen- Parameters:
p_282736_- the GuiGraphics object used for rendering.p_283347_- the x-coordinate of the mouse cursor.p_282480_- the y-coordinate of the mouse cursor.p_283485_- the partial tick time.
-
openTrialAvailablePopup
private void openTrialAvailablePopup() -
play
-
play
public static void play(@Nullable RealmsServer pRealmsServer, Screen pLastScreen, boolean pAllowSnapshots) -
confirmToPlay
private static void confirmToPlay(RealmsServer pRealmsServer, Screen pLastScreen, Component pTitle, Component pMessage, Component pConfirmButton) -
upgradeRealmAndPlay
-
getVersionComponent
-
getVersionComponent
-
getGameModeComponent
-
isSelfOwnedServer
-
isSelfOwnedNonExpiredServer
-
renderEnvironment
-