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) 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) class
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate RealmsMainScreen.LayoutState
private Button
private final CompletableFuture
<RealmsAvailability.Result> private List
<RealmsServer> private Button
private static final int
private static final int
private static final int
(package private) static final ResourceLocation
private static final Component
private Button
private static final int
private DataFetcher.Subscription
private static final int
(package private) static final ResourceLocation
(package private) static final ResourceLocation
private static final int
private static final int
private static final Component
private static final Component
(package private) static final ResourceLocation
private static final ResourceLocation
private final com.google.common.util.concurrent.RateLimiter
private static final int
(package private) long
private final Screen
private HeaderAndFooterLayout
private static final Component
private Button
private static final Component
(package private) static final org.slf4j.Logger
private static final int
private static final ResourceLocation
private static final int
private static final int
private static final int
private static final int
(package private) static final ResourceLocation
private static final int
private static final int
private static final ResourceLocation
private String
private static final Component
private static final ResourceLocation
private static final Component
private final List
<RealmsNotification> (package private) RealmsServerPlayerLists
(package private) static final ResourceLocation
private static final Component
private static final Component
private Button
(package private) RealmsMainScreen.RealmSelectionList
private static boolean
private 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
private RealmsServerList
private static final boolean
private static boolean
(package private) static final Component
private static final Component
private static final Component
(package private) static final Component
private boolean
(package private) static final Component
Fields inherited from class net.minecraft.realms.RealmsScreen
COLOR_DARK_GRAY, COLOR_GREEN, COLOR_LINK, COLOR_LINK_HOVER, COLOR_MEDIUM_GRAY, EXPIRATION_NOTIFICATION_DAYS, SIZE_LIMIT, SKIN_FACE_SIZE, TITLE_HEIGHT
Fields inherited from class net.minecraft.client.gui.screens.Screen
CUBE_MAP, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, PANORAMA, renderables, screenExecutor, title, width
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
addListEntriesForNotification
(RealmsNotification pNotification) private static <T> void
callRealmsClient
(RealmsMainScreen.RealmsCall<T> pCall, Consumer<T> pOnFinish) private void
configureClicked
(RealmsServer pRealmsServer) private static void
confirmToPlay
(RealmsServer pRealmsServer, Screen pLastScreen, Component pTitle, Component pMessage, Component pConfirmButton) private Layout
createFooter
(RealmsMainScreen.LayoutState pLayoutState) private Layout
private HeaderAndFooterLayout
createLayout
(RealmsMainScreen.LayoutState pLayoutState) private LinearLayout
private void
(package private) void
dismissNotification
(UUID p_275349_) private RealmsServer
static Component
getVersionComponent
(String pVersion, boolean pCompatible) static Component
getVersionComponent
(String pVersion, int pColor) void
init()
private DataFetcher.Subscription
initDataFetcher
(RealmsDataFetcher pDataFetcher) private boolean
isSelfOwnedNonExpiredServer
(RealmsServer pServer) (package private) static boolean
isSelfOwnedServer
(RealmsServer pServer) static boolean
private void
leaveClicked
(RealmsServer pRealmsServer) private void
leaveServer
(RealmsServer pServer) private void
markNotificationsAsSeen
(Collection<RealmsNotification> pNotifications) void
onClose()
private void
onRenew
(RealmsServer pRealmsServer) private void
private void
static void
play
(RealmsServer pRealmsServer, Screen pLastScreen) static void
play
(RealmsServer pRealmsServer, Screen pLastScreen, boolean pAllowSnapshots) private void
static void
static void
void
render
(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) Renders the graphical user interface (GUI) element.private void
renderEnvironment
(GuiGraphics pGuiGraphics, String pText, int pColor) protected void
void
private boolean
shouldConfigureButtonBeActive
(RealmsServer pRealmsServer) private boolean
shouldLeaveButtonBeActive
(RealmsServer pRealmsServer) (package private) boolean
shouldPlayButtonBeActive
(RealmsServer pRealmsServer) private boolean
shouldRenewButtonBeActive
(RealmsServer pRealmsServer) void
tick()
(package private) void
private void
private void
updateLayout
(RealmsMainScreen.LayoutState pLayoutState) private static void
upgradeRealmAndPlay
(RealmsServer pServer, Screen pLastScreen) Methods inherited from class net.minecraft.realms.RealmsScreen
addLabel, createLabelNarration, row
Methods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearTooltipForNextRenderPass, clearWidgets, findNarratableWidget, getBackgroundMusic, getMinecraft, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, keyPressed, onFilesDrop, rebuildWidgets, removed, removeWidget, renderBackground, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltip, resize, setInitialFocus, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatus, wrapScreenError
Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocused
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocused
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved
Methods 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
-
LOGGER
static 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
-
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_WIDTH
private static final int LOGO_WIDTH- See Also:
-
LOGO_HEIGHT
private static final int LOGO_HEIGHT- See Also:
-
LOGO_TEXTURE_WIDTH
private static final int LOGO_TEXTURE_WIDTH- See Also:
-
LOGO_TEXTURE_HEIGHT
private static final int LOGO_TEXTURE_HEIGHT- 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:
-
ENTRY_WIDTH
private static final int ENTRY_WIDTH- See Also:
-
ITEM_HEIGHT
private static final int ITEM_HEIGHT- See Also:
-
SNAPSHOT
private static final boolean SNAPSHOT -
snapshotToggle
private static boolean snapshotToggle -
availability
-
dataSubscription
-
handledSeenNotifications
-
regionsPinged
private static boolean regionsPinged -
inviteNarrationLimiter
private final com.google.common.util.concurrent.RateLimiter inviteNarrationLimiter -
lastScreen
-
playButton
-
backButton
-
renewButton
-
configureButton
-
leaveButton
-
realmSelectionList
RealmsMainScreen.RealmSelectionList realmSelectionList -
serverList
-
availableSnapshotServers
-
onlinePlayersPerRealm
RealmsServerPlayerLists onlinePlayersPerRealm -
trialsAvailable
private volatile boolean trialsAvailable -
newsLink
-
lastClickTime
long lastClickTime -
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:
repositionElements
in classScreen
-
onClose
public void onClose() -
updateLayout
private void updateLayout() -
updateLayout
-
createLayout
-
createHeader
-
createNoRealmsContent
-
updateButtonStates
void updateButtonStates() -
shouldPlayButtonBeActive
-
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() -
addListEntriesForNotification
-
pingRegions
private void pingRegions() -
getOwnedNonExpiredRealmIds
-
onRenew
-
configureClicked
-
leaveClicked
-
getSelectedServer
-
leaveServer
-
dismissNotification
-
resetScreen
public void resetScreen() -
getNarrationMessage
- Overrides:
getNarrationMessage
in classScreen
-
render
Renders the graphical user interface (GUI) element.- Specified by:
render
in interfaceRenderable
- Overrides:
render
in 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.
-
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
-
isSelfOwnedServer
-
isSelfOwnedNonExpiredServer
-
renderEnvironment
-