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
Modifier 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) class
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult
-
Field Summary
Modifier and TypeFieldDescription(package private) int
private Button
private static final int
private static final int
private static final int
private Button
private int
private int
(package private) static boolean
(package private) static boolean
private Button
private static final Component
private Button
private ReentrantLock
private boolean
private Button
(package private) static final ResourceLocation
private static final ResourceLocation
private DataFetcher.Subscription
private boolean
private static final ResourceLocation
private static final ResourceLocation
private static final int
private MultiLineLabel
private boolean
(package private) static boolean
private boolean
(package private) boolean
private static final int
(package private) static final ResourceLocation
(package private) static final ResourceLocation
(package private) static final ResourceLocation
private final com.google.common.util.concurrent.RateLimiter
private boolean
(package private) long
(package private) final Screen
private static int
private static final Component
private Button
(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
private static final ResourceLocation
private static final Component
private Button
(package private) String
private final List<RealmsNotification>
(package private) int
private static final ResourceLocation
private static final ResourceLocation
private static boolean
private static final Component
private Button
private static final ResourceLocation
private static final Component
(package private) boolean
(package private) RealmsMainScreen.RealmSelectionList
(package private) static Screen
private boolean
private List<RealmsServer>
private static boolean
private Button
(package private) static final Component
private static final Component
private static final Component
private static final Component
private static final Component
private static final Component
(package private) static final Component
private RealmsServerList
private boolean
private Button
(package private) static final Component
private static final Component
private static List<ResourceLocation>
(package private) static final Component
private static final ResourceLocation
(package private) static final Component
private boolean
(package private) static final Component
(package private) static final ResourceLocation
Fields 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_URL
Fields inherited from class net.minecraft.client.gui.screens.Screen
BACKGROUND_LOCATION, font, height, minecraft, renderables, screenExecutor, title, width
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
addEntriesForNotification
(RealmsMainScreen.RealmSelectionList p_275392_, RealmsNotification p_275492_) void
void
void
private static <T> void
callRealmsClient
(RealmsMainScreen.RealmsCall<T> p_275561_, Consumer<T> p_275686_) boolean
charTyped
(char p_86388_, int p_86389_) private void
(package private) void
private void
configureClicked
(RealmsServer p_86657_) (package private) void
dismissNotification
(UUID p_275349_) (package private) void
drawClose
(GuiGraphics p_281685_, int p_282388_, int p_282489_, int p_281732_, int p_283445_) (package private) void
drawExpired
(GuiGraphics p_282859_, int p_283367_, int p_283231_, int p_281593_, int p_281773_) (package private) void
drawExpiring
(GuiGraphics p_283382_, int p_282134_, int p_283200_, int p_281673_, int p_282920_, int p_282554_) (package private) void
drawOpen
(GuiGraphics p_283235_, int p_281895_, int p_283564_, int p_281543_, int p_282977_) private void
drawPopup
(GuiGraphics p_283329_, int p_290033_, int p_290032_, float p_290030_) private RealmsServer
private static boolean
void
init()
private DataFetcher.Subscription
initDataFetcher
(RealmsDataFetcher p_238836_) private boolean
isOutsidePopup
(double p_86394_, double p_86395_) private boolean
isSelfOwnedNonExpiredServer
(RealmsServer p_86689_) (package private) boolean
isSelfOwnedServer
(RealmsServer p_86684_) boolean
keyPressed
(int p_86401_, int p_86402_, int p_86403_) private void
leaveClicked
(RealmsServer p_86670_) private void
leaveServer
(boolean p_193494_, RealmsServer p_193495_) boolean
mouseClicked
(double p_86397_, double p_86398_, int p_86399_) (package private) void
private void
onRenew
(RealmsServer p_193500_) private void
void
play
(RealmsServer p_86516_, Screen p_86517_) (package private) int
popupX0()
(package private) int
popupY0()
(package private) void
private void
(package private) void
removeServer
(RealmsServer p_86677_) void
render
(GuiGraphics p_282736_, int p_283347_, int p_282480_, float p_283485_) private void
renderLocal
(GuiGraphics p_282133_) (package private) void
renderNews
(GuiGraphics p_282435_, int p_283627_, int p_282268_, boolean p_282717_, int p_282793_, int p_283443_, boolean p_282143_, boolean p_282764_) private void
renderStage
(GuiGraphics p_282858_) void
private void
void
setCreatedTrial
(boolean p_167191_) private boolean
shouldConfigureButtonBeActive
(RealmsServer p_86620_) private boolean
shouldLeaveButtonBeActive
(RealmsServer p_86645_) (package private) boolean
shouldPlayButtonBeActive
(RealmsServer p_86563_) private boolean
shouldRenewButtonBeActive
(RealmsServer p_86595_) private boolean
boolean
private boolean
private void
private void
private void
void
tick()
(package private) void
updateButtonStates
(RealmsServer p_86514_) static void
updateTeaserImages
(ResourceManager p_86407_) 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, clearWidgets, findNarratableWidget, getBackgroundMusic, 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, renderDirtBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, 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
getChildAt, getCurrentFocusPath, isFocused, keyReleased, magicalSpecialHackyFocus, 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
-
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
-
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:
-
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:
-
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:
keyPressed
in interfaceContainerEventHandler
- Specified by:
keyPressed
in interfaceGuiEventListener
- Overrides:
keyPressed
in classScreen
-
onClosePopup
void onClosePopup() -
charTyped
public boolean charTyped(char p_86388_, int p_86389_) -
render
- Specified by:
render
in interfaceRenderable
- Overrides:
render
in classScreen
-
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() -
play
-
isSelfOwnedServer
-
isSelfOwnedNonExpiredServer
-
drawExpired
-
drawExpiring
void drawExpiring(GuiGraphics p_283382_, int p_282134_, int p_283200_, int p_281673_, int p_282920_, int p_282554_) -
drawOpen
-
drawClose
-
renderNews
void renderNews(GuiGraphics p_282435_, int p_283627_, int p_282268_, boolean p_282717_, int p_282793_, int p_283443_, boolean p_282143_, boolean p_282764_) -
renderLocal
-
renderStage
-
newScreen
-