Package com.mojang.realmsclient
Class 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) class(package private) class(package private) static interface(package private) class(package private) class(package private) classNested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescription(package private) intprivate Buttonprivate static final intprivate static final intprivate static final intprivate Buttonprivate intprivate int(package private) static boolean(package private) static booleanprivate Buttonprivate static final Componentprivate Buttonprivate ReentrantLockprivate booleanprivate Button(package private) static final ResourceLocationprivate static final ResourceLocationprivate DataFetcher.Subscriptionprivate booleanprivate static final ResourceLocationprivate static final ResourceLocationprivate static final intprivate MultiLineLabelprivate boolean(package private) static booleanprivate boolean(package private) boolean(package private) static final ResourceLocationprivate static final ResourceLocationprivate static final ResourceLocationprivate final com.google.common.util.concurrent.RateLimiterprivate boolean(package private) long(package private) final Screenprivate static intprivate static final Componentprivate Button(package private) static final org.slf4j.Loggerprivate static final ResourceLocationprivate static final ResourceLocationprivate static final Componentprivate Button(package private) String(package private) static final Componentprivate final List<RealmsNotification>(package private) intprivate static final ResourceLocationprivate static final ResourceLocationprivate static boolean(package private) static final Componentprivate static final Componentprivate Buttonprivate static final ResourceLocationprivate static final Component(package private) boolean(package private) RealmsMainScreen.RealmSelectionList(package private) static Screenprivate booleanprivate List<RealmsServer>private static booleanprivate Button(package private) static final Componentprivate static final Componentprivate static final Componentprivate static final Componentprivate static final Componentprivate static final Component(package private) static final Componentprivate RealmsServerListprivate booleanprivate Button(package private) static final Componentprivate static final Componentprivate static List<ResourceLocation>(package private) static final Componentprivate static final ResourceLocation(package private) static final Componentprivate boolean(package private) static final Component(package private) static final ResourceLocationFields inherited from class net.minecraft.realms.RealmsScreen
COLOR_BLACK, COLOR_BRIGHT_YELLOW, COLOR_BUTTON_YELLOW, COLOR_DARK_GRAY, COLOR_DARK_GREEN, COLOR_GRAY, COLOR_GREEN, COLOR_INFO, COLOR_LINK, COLOR_LINK_HOVER, COLOR_MEDIUM_GRAY, COLOR_RED, COLOR_RED_FADE, COLOR_WHITE, COLOR_YELLOW, COMPONENT_HEIGHT, EXPIRATION_NOTIFICATION_DAYS, SIZE_LIMIT, SKIN_FACE_SIZE, TITLE_HEIGHT, UPDATE_BREAKS_ADVENTURE_URLFields inherited from class net.minecraft.client.gui.screens.Screen
font, height, itemRenderer, minecraft, passEvents, renderables, title, widthFields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, LIGHT_DIRT_BACKGROUND, STATS_ICON_LOCATIONFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddEntriesForNotification(RealmsMainScreen.RealmSelectionList p_275392_, RealmsNotification p_275492_) voidvoidvoidprivate static <T> voidcallRealmsClient(RealmsMainScreen.RealmsCall<T> p_275561_, Consumer<T> p_275686_) booleancharTyped(char p_86388_, int p_86389_) private void(package private) voidprivate voidconfigureClicked(RealmsServer p_86657_) (package private) voiddismissNotification(UUID p_275349_) (package private) void(package private) voiddrawExpired(PoseStack p_86577_, int p_86578_, int p_86579_, int p_86580_, int p_86581_) (package private) voiddrawExpiring(PoseStack p_86538_, int p_86539_, int p_86540_, int p_86541_, int p_86542_, int p_86543_) (package private) voiddrawInvitationPendingIcon(PoseStack p_86425_, int p_86426_, int p_86427_, int p_86428_, int p_86429_, boolean p_86430_, boolean p_86431_) (package private) voidprivate voidprivate voiddrawRealmsLogo(PoseStack p_86409_, int p_86410_, int p_86411_) private RealmsServerprivate static booleanvoidinit()private DataFetcher.SubscriptioninitDataFetcher(RealmsDataFetcher p_238836_) private booleaninPendingInvitationArea(double p_86572_, double p_86573_) private booleanisOutsidePopup(double p_86394_, double p_86395_) private booleanisSelfOwnedNonExpiredServer(RealmsServer p_86689_) (package private) booleanisSelfOwnedServer(RealmsServer p_86684_) booleankeyPressed(int p_86401_, int p_86402_, int p_86403_) private voidleaveClicked(RealmsServer p_86670_) private voidleaveServer(boolean p_193494_, RealmsServer p_193495_) booleanmouseClicked(double p_86397_, double p_86398_, int p_86399_) (package private) voidprivate voidonRenew(RealmsServer p_193500_) private voidpendingButtonPress(Button p_86519_) private voidvoidplay(RealmsServer p_86516_, Screen p_86517_) (package private) intpopupX0()(package private) intpopupY0()(package private) voidprivate void(package private) voidremoveServer(RealmsServer p_86677_) voidprivate voidrenderLocal(PoseStack p_86532_) (package private) voidrenderNews(PoseStack p_86433_, int p_86434_, int p_86435_, boolean p_86436_, int p_86437_, int p_86438_, boolean p_86439_, boolean p_86440_) private voidrenderStage(PoseStack p_86575_) voidprivate voidvoidsetCreatedTrial(boolean p_167191_) private booleanshouldConfigureButtonBeActive(RealmsServer p_86620_) private booleanshouldLeaveButtonBeActive(RealmsServer p_86645_) (package private) booleanshouldPlayButtonBeActive(RealmsServer p_86563_) private booleanshouldRenewButtonBeActive(RealmsServer p_86595_) private booleanbooleanprivate booleanprivate voidprivate voidprivate voidvoidtick()(package private) voidupdateButtonStates(RealmsServer p_86514_) static voidupdateTeaserImages(ResourceManager p_86407_) Methods inherited from class net.minecraft.realms.RealmsScreen
addLabel, createLabelNarration, rowMethods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearWidgets, findNarratableWidget, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, hideWidgets, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, narrationEnabled, onClose, onFilesDrop, rebuildWidgets, removed, removeWidget, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderComponentTooltip, renderComponentTooltip, renderComponentTooltip, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderWithTooltip, repositionElements, resize, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blit, blitNineSliced, blitNineSliced, blitNineSliced, blitOutlineBlack, blitRepeating, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, fill, fill, fillGradient, fillGradient, fillGradient, hLine, renderOutline, vLineMethods 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
getChildAt, getCurrentFocusPath, isFocused, keyReleased, magicalSpecialHackyFocus, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMovedMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
LOGGER
static final org.slf4j.Logger LOGGER -
ON_ICON_LOCATION
-
OFF_ICON_LOCATION
-
EXPIRED_ICON_LOCATION
-
EXPIRES_SOON_ICON_LOCATION
-
INVITATION_ICONS_LOCATION
-
INVITE_ICON_LOCATION
-
WORLDICON_LOCATION
-
LOGO_LOCATION
-
NEWS_LOCATION
-
POPUP_LOCATION
-
DARKEN_LOCATION
-
CROSS_ICON_LOCATION
-
TRIAL_ICON_LOCATION
-
INFO_ICON_LOCATION
-
NO_PENDING_INVITES_TEXT
-
PENDING_INVITES_TEXT
-
TRIAL_MESSAGE_LINES
-
SERVER_UNITIALIZED_TEXT
-
SUBSCRIPTION_EXPIRED_TEXT
-
SUBSCRIPTION_RENEW_TEXT
-
TRIAL_EXPIRED_TEXT
-
SELECT_MINIGAME_PREFIX
-
POPUP_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
-
NEWS_TOOLTIP
-
UNITIALIZED_WORLD_NARRATION
-
TRIAL_TEXT
-
BUTTON_WIDTH
private static final int BUTTON_WIDTH- See Also:
-
BUTTON_TOP_ROW_WIDTH
private static final int BUTTON_TOP_ROW_WIDTH- See Also:
-
BUTTON_BOTTOM_ROW_WIDTH
private static final int BUTTON_BOTTOM_ROW_WIDTH- See Also:
-
FOOTER_HEIGHT
private static final int FOOTER_HEIGHT- See Also:
-
dataSubscription
-
serverList
-
handledSeenNotifications
-
overrideConfigure
private static boolean overrideConfigure -
lastScrollYPosition
private static int lastScrollYPosition -
hasParentalConsent
static volatile boolean hasParentalConsent -
checkedParentalConsent
static volatile boolean checkedParentalConsent -
checkedClientCompatability
static volatile boolean checkedClientCompatability -
realmsGenericErrorScreen
-
regionsPinged
private static boolean regionsPinged -
inviteNarrationLimiter
private final com.google.common.util.concurrent.RateLimiter inviteNarrationLimiter -
dontSetConnectedToRealms
private boolean dontSetConnectedToRealms -
lastScreen
-
realmSelectionList
RealmsMainScreen.RealmSelectionList realmSelectionList -
realmsSelectionListAdded
private boolean realmsSelectionListAdded -
playButton
-
backButton
-
renewButton
-
configureButton
-
leaveButton
-
realmsServers
-
numberOfPendingInvites
volatile int numberOfPendingInvites -
animTick
int animTick -
hasFetchedServers
private boolean hasFetchedServers -
popupOpenedByUser
boolean popupOpenedByUser -
justClosedPopup
private boolean justClosedPopup -
trialsAvailable
private volatile boolean trialsAvailable -
createdTrial
private volatile boolean createdTrial -
showingPopup
private volatile boolean showingPopup -
hasUnreadNews
volatile boolean hasUnreadNews -
newsLink
-
carouselIndex
private int carouselIndex -
carouselTick
private int carouselTick -
hasSwitchedCarouselImage
private boolean hasSwitchedCarouselImage -
keyCombos
-
lastClickTime
long lastClickTime -
connectLock
-
formattedPopup
-
notifications
-
showPopupButton
-
pendingInvitesButton
-
newsButton
-
createTrialButton
-
buyARealmButton
-
closeButton
-
-
Constructor Details
-
RealmsMainScreen
-
-
Method Details
-
shouldShowMessageInList
private boolean shouldShowMessageInList() -
shouldShowPopup
public boolean shouldShowPopup() -
init
public void init() -
hasParentalConsent
private static boolean hasParentalConsent() -
addTopButtons
public void addTopButtons() -
addMiddleButtons
public void addMiddleButtons() -
updateButtonStates
-
shouldShowPopupButton
private boolean shouldShowPopupButton() -
shouldPlayButtonBeActive
-
shouldRenewButtonBeActive
-
shouldConfigureButtonBeActive
-
shouldLeaveButtonBeActive
-
tick
public void tick() -
initDataFetcher
-
callRealmsClient
private static <T> void callRealmsClient(RealmsMainScreen.RealmsCall<T> p_275561_, Consumer<T> p_275686_) -
refreshRealmsSelectionList
private void refreshRealmsSelectionList() -
addEntriesForNotification
private void addEntriesForNotification(RealmsMainScreen.RealmSelectionList p_275392_, RealmsNotification p_275492_) -
refreshFetcher
void refreshFetcher() -
pingRegions
private void pingRegions() -
getOwnedNonExpiredWorldIds
-
setCreatedTrial
public void setCreatedTrial(boolean p_167191_) -
onRenew
-
checkClientCompatability
private void checkClientCompatability() -
checkParentalConsent
void checkParentalConsent() -
switchToStage
private void switchToStage() -
switchToLocal
private void switchToLocal() -
switchToProd
private void switchToProd() -
configureClicked
-
leaveClicked
-
saveListScrollPosition
private void saveListScrollPosition() -
getSelectedServer
-
leaveServer
-
removeServer
-
dismissNotification
-
resetScreen
public void resetScreen() -
keyPressed
public boolean keyPressed(int p_86401_, int p_86402_, int p_86403_) - Specified by:
keyPressedin interfaceContainerEventHandler- Specified by:
keyPressedin interfaceGuiEventListener- Overrides:
keyPressedin classScreen
-
onClosePopup
void onClosePopup() -
charTyped
public boolean charTyped(char p_86388_, int p_86389_) -
render
- Specified by:
renderin interfaceRenderable- Overrides:
renderin classScreen
-
drawRealmsLogo
-
mouseClicked
public boolean mouseClicked(double p_86397_, double p_86398_, int p_86399_) -
isOutsidePopup
private boolean isOutsidePopup(double p_86394_, double p_86395_) -
drawPopup
-
popupX0
int popupX0() -
popupY0
int popupY0() -
drawInvitationPendingIcon
void drawInvitationPendingIcon(PoseStack p_86425_, int p_86426_, int p_86427_, int p_86428_, int p_86429_, boolean p_86430_, boolean p_86431_) -
inPendingInvitationArea
private boolean inPendingInvitationArea(double p_86572_, double p_86573_) -
play
-
isSelfOwnedServer
-
isSelfOwnedNonExpiredServer
-
drawExpired
-
drawExpiring
void drawExpiring(PoseStack p_86538_, int p_86539_, int p_86540_, int p_86541_, int p_86542_, int p_86543_) -
drawOpen
-
drawClose
-
renderNews
void renderNews(PoseStack p_86433_, int p_86434_, int p_86435_, boolean p_86436_, int p_86437_, int p_86438_, boolean p_86439_, boolean p_86440_) -
renderLocal
-
renderStage
-
newScreen
-
pendingButtonPress
-