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 SummaryNested ClassesModifier and TypeClassDescription(package private) class(package private) class(package private) static class(package private) 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.ScreenScreen.NarratableSearchResult
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate RealmsMainScreen.LayoutStateprivate Buttonprivate final CompletableFuture<RealmsAvailability.Result>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.Subscriptionprivate static final int(package private) static final ResourceLocation(package private) static final ResourceLocationprivate static final intprivate static final int(package private) static final ResourceLocationprivate static final ResourceLocationprivate final com.google.common.util.concurrent.RateLimiterprivate static final int(package private) longprivate final Screenprivate HeaderAndFooterLayoutprivate static final Componentprivate Buttonprivate static final Component(package private) static final org.slf4j.Loggerprivate static final intprivate static final ResourceLocationprivate static final intprivate static final intprivate static final intprivate 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 Componentprivate final List<RealmsNotification>(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 Componentprivate 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.RealmsScreenCOLOR_DARK_GRAY, COLOR_GREEN, COLOR_INFO, COLOR_LINK, COLOR_LINK_HOVER, COLOR_MEDIUM_GRAY, EXPIRATION_NOTIFICATION_DAYS, SIZE_LIMIT, SKIN_FACE_SIZE, TITLE_HEIGHTFields inherited from class net.minecraft.client.gui.screens.ScreenBACKGROUND_LOCATION, font, height, minecraft, renderables, screenExecutor, title, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListenerDOUBLE_CLICK_THRESHOLD_MS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprivate booleanaddListEntriesForNotification(RealmsNotification p_304511_) private static <T> voidcallRealmsClient(RealmsMainScreen.RealmsCall<T> p_275561_, Consumer<T> p_275686_) private voidconfigureClicked(RealmsServer p_86657_) private static voidconfirmToPlay(RealmsServer p_305792_, Screen p_306263_, Component p_305782_, Component p_306311_, Component p_306238_) private LayoutcreateFooter(RealmsMainScreen.LayoutState p_294561_) private Layoutprivate HeaderAndFooterLayoutcreateLayout(RealmsMainScreen.LayoutState p_295052_) private LinearLayoutprivate void(package private) voiddismissNotification(UUID p_275349_) private RealmsServerstatic ComponentgetVersionComponent(String p_307541_, boolean p_307256_) static ComponentgetVersionComponent(String p_307429_, int p_307536_) voidinit()private DataFetcher.SubscriptioninitDataFetcher(RealmsDataFetcher p_238836_) private booleanisSelfOwnedNonExpiredServer(RealmsServer p_86689_) (package private) booleanisSelfOwnedServer(RealmsServer p_86684_) static booleanprivate voidleaveClicked(RealmsServer p_86670_) private voidleaveServer(boolean p_193494_, RealmsServer p_193495_) private voidmarkNotificationsAsSeen(Collection<RealmsNotification> p_304698_) private voidonRenew(RealmsServer p_193500_) private voidprivate voidstatic voidplay(RealmsServer p_86516_, Screen p_86517_) static voidplay(RealmsServer p_305964_, Screen p_305959_, boolean p_306296_) private voidstatic voidstatic voidvoidrender(GuiGraphics p_282736_, int p_283347_, int p_282480_, float p_283485_) private voidrenderEnvironment(GuiGraphics p_294591_, String p_295050_, int p_294351_) protected voidvoidprivate booleanshouldConfigureButtonBeActive(RealmsServer p_86620_) private booleanshouldLeaveButtonBeActive(RealmsServer p_86645_) (package private) booleanshouldPlayButtonBeActive(RealmsServer p_86563_) private booleanshouldRenewButtonBeActive(RealmsServer p_86595_) voidtick()(package private) voidprivate voidprivate voidupdateLayout(RealmsMainScreen.LayoutState p_294474_) Methods inherited from class net.minecraft.realms.RealmsScreenaddLabel, createLabelNarration, rowMethods inherited from class net.minecraft.client.gui.screens.Screenadded, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearWidgets, findNarratableWidget, getBackgroundMusic, getMinecraft, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, hideWidgets, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, keyPressed, narrationEnabled, onClose, onFilesDrop, rebuildWidgets, removed, removeWidget, renderBackground, renderDirtBackground, renderTransparentBackground, renderWithTooltip, resize, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandlergetFocused, isDragging, setDragging, setFocusedMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandlercharTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, magicalSpecialHackyFocus, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListenermouseMovedMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElementgetTabOrderGroup
- 
Field Details- 
INFO_SPRITE
- 
NEW_REALM_SPRITE
- 
EXPIRED_SPRITE
- 
EXPIRES_SOON_SPRITE
- 
OPEN_SPRITE
- 
CLOSED_SPRITE
- 
INVITE_SPRITE
- 
NEWS_SPRITE
- 
LOGGERstatic final org.slf4j.Logger LOGGER
- 
LOGO_LOCATION
- 
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
- 
BUTTON_WIDTHprivate static final int BUTTON_WIDTH- See Also:
 
- 
BUTTON_COLUMNSprivate static final int BUTTON_COLUMNS- See Also:
 
- 
BUTTON_SPACINGprivate static final int BUTTON_SPACING- See Also:
 
- 
CONTENT_WIDTHprivate static final int CONTENT_WIDTH- See Also:
 
- 
LOGO_WIDTHprivate static final int LOGO_WIDTH- See Also:
 
- 
LOGO_HEIGHTprivate static final int LOGO_HEIGHT- See Also:
 
- 
LOGO_TEXTURE_WIDTHprivate static final int LOGO_TEXTURE_WIDTH- See Also:
 
- 
LOGO_TEXTURE_HEIGHTprivate static final int LOGO_TEXTURE_HEIGHT- See Also:
 
- 
LOGO_PADDINGprivate static final int LOGO_PADDING- See Also:
 
- 
HEADER_HEIGHTprivate static final int HEADER_HEIGHT- See Also:
 
- 
FOOTER_PADDINGprivate static final int FOOTER_PADDING- See Also:
 
- 
NEW_REALM_SPRITE_WIDTHprivate static final int NEW_REALM_SPRITE_WIDTH- See Also:
 
- 
NEW_REALM_SPRITE_HEIGHTprivate static final int NEW_REALM_SPRITE_HEIGHT- See Also:
 
- 
ENTRY_WIDTHprivate static final int ENTRY_WIDTH- See Also:
 
- 
ITEM_HEIGHTprivate static final int ITEM_HEIGHT- See Also:
 
- 
SNAPSHOTprivate static final boolean SNAPSHOT
- 
snapshotToggleprivate static boolean snapshotToggle
- 
availability
- 
dataSubscription
- 
handledSeenNotifications
- 
regionsPingedprivate static boolean regionsPinged
- 
inviteNarrationLimiterprivate final com.google.common.util.concurrent.RateLimiter inviteNarrationLimiter
- 
lastScreen
- 
playButton
- 
backButton
- 
renewButton
- 
configureButton
- 
leaveButton
- 
realmSelectionListRealmsMainScreen.RealmSelectionList realmSelectionList
- 
serverList
- 
availableSnapshotServers
- 
trialsAvailableprivate volatile boolean trialsAvailable
- 
newsLink
- 
lastClickTimelong lastClickTime
- 
notifications
- 
addRealmButton
- 
pendingInvitesButton
- 
newsButton
- 
activeLayoutState
- 
layout
 
- 
- 
Constructor Details- 
RealmsMainScreen
 
- 
- 
Method Details- 
initpublic void init()
- 
isSnapshotpublic static boolean isSnapshot()
- 
repositionElementsprotected void repositionElements()- Overrides:
- repositionElementsin class- Screen
 
- 
updateLayoutprivate void updateLayout()
- 
updateLayout
- 
createLayout
- 
createHeader
- 
createNoRealmsContent
- 
updateButtonStatesvoid updateButtonStates()
- 
shouldPlayButtonBeActive
- 
shouldRenewButtonBeActive
- 
shouldConfigureButtonBeActive
- 
shouldLeaveButtonBeActive
- 
tickpublic void tick()
- 
refreshPendingInvitespublic static void refreshPendingInvites()
- 
refreshServerListpublic static void refreshServerList()
- 
debugRefreshDataFetchersprivate void debugRefreshDataFetchers()
- 
initDataFetcher
- 
markNotificationsAsSeen
- 
callRealmsClientprivate static <T> void callRealmsClient(RealmsMainScreen.RealmsCall<T> p_275561_, Consumer<T> p_275686_) 
- 
refreshListAndLayoutprivate void refreshListAndLayout()
- 
addListEntriesForNotification
- 
pingRegionsprivate void pingRegions()
- 
getOwnedNonExpiredWorldIds
- 
onRenew
- 
configureClicked
- 
leaveClicked
- 
getSelectedServer
- 
leaveServer
- 
dismissNotification
- 
resetScreenpublic void resetScreen()
- 
getNarrationMessage- Overrides:
- getNarrationMessagein class- Screen
 
- 
render- Specified by:
- renderin interface- Renderable
- Overrides:
- renderin class- Screen
 
- 
openTrialAvailablePopupprivate void openTrialAvailablePopup()
- 
play
- 
play
- 
confirmToPlayprivate static void confirmToPlay(RealmsServer p_305792_, Screen p_306263_, Component p_305782_, Component p_306311_, Component p_306238_) 
- 
getVersionComponent
- 
getVersionComponent
- 
isSelfOwnedServer
- 
isSelfOwnedNonExpiredServer
- 
renderEnvironment
 
-