Package com.mojang.realmsclient
Class RealmsMainScreen
- java.lang.Object
-
- net.minecraft.client.gui.AbstractGui
-
- net.minecraft.client.gui.FocusableGui
-
- net.minecraft.client.gui.screen.Screen
-
- net.minecraft.realms.RealmsScreen
-
- com.mojang.realmsclient.RealmsMainScreen
-
- All Implemented Interfaces:
IGuiEventListener
,INestedGuiEventHandler
,IRenderable
,IScreen
public class RealmsMainScreen extends RealmsScreen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
RealmsMainScreen.CloseButton
(package private) class
RealmsMainScreen.InfoButton
(package private) class
RealmsMainScreen.ListEntry
(package private) class
RealmsMainScreen.NewsButton
(package private) class
RealmsMainScreen.PendingInvitesButton
(package private) class
RealmsMainScreen.ServerEntry
(package private) class
RealmsMainScreen.ServerList
(package private) static class
RealmsMainScreen.ServerState
(package private) class
RealmsMainScreen.TrialServerEntry
-
Field Summary
-
Fields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, font, height, itemRenderer, minecraft, passEvents, title, width
-
Fields inherited from class net.minecraft.client.gui.AbstractGui
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
-
-
Constructor Summary
Constructors Constructor Description RealmsMainScreen(Screen p_i232181_1_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addButtons()
boolean
charTyped(char p_231042_1_, int p_231042_2_)
private void
checkClientCompatability()
private void
checkParentalConsent()
private void
checkUnreadNews()
private void
configureClicked(RealmsServer p_223966_1_)
private void
drawClose(MatrixStack p_237626_1_, int p_237626_2_, int p_237626_3_, int p_237626_4_, int p_237626_5_)
private void
drawConfigure(MatrixStack p_237633_1_, int p_237633_2_, int p_237633_3_, int p_237633_4_, int p_237633_5_)
private void
drawExpired(MatrixStack p_237614_1_, int p_237614_2_, int p_237614_3_, int p_237614_4_, int p_237614_5_)
private void
drawExpiring(MatrixStack p_237606_1_, int p_237606_2_, int p_237606_3_, int p_237606_4_, int p_237606_5_, int p_237606_6_)
private void
drawInvitationPendingIcon(MatrixStack p_237581_1_, int p_237581_2_, int p_237581_3_, int p_237581_4_, int p_237581_5_, boolean p_237581_6_, boolean p_237581_7_)
private void
drawLeave(MatrixStack p_237630_1_, int p_237630_2_, int p_237630_3_, int p_237630_4_, int p_237630_5_)
private void
drawOpen(MatrixStack p_237620_1_, int p_237620_2_, int p_237620_3_, int p_237620_4_, int p_237620_5_)
private void
drawPopup(MatrixStack p_237605_1_, int p_237605_2_, int p_237605_3_)
private void
drawRealmsLogo(MatrixStack p_237579_1_, int p_237579_2_, int p_237579_3_)
private RealmsServer
findServer(long p_223967_1_)
private java.util.List<java.lang.Long>
getOwnedNonExpiredWorldIds()
private static boolean
hasParentalConsent()
void
init()
private boolean
inPendingInvitationArea(double p_223931_1_, double p_223931_3_)
private boolean
isOutsidePopup(double p_223979_1_, double p_223979_3_)
private boolean
isSelfOwnedNonExpiredServer(RealmsServer p_223991_1_)
private boolean
isSelfOwnedServer(RealmsServer p_223885_1_)
boolean
keyPressed(int p_231046_1_, int p_231046_2_, int p_231046_3_)
private void
leaveClicked(RealmsServer p_223906_1_)
private void
leaveServer(boolean p_237625_1_)
boolean
mouseClicked(double p_231044_1_, double p_231044_3_, int p_231044_5_)
RealmsMainScreen
newScreen()
private void
onClosePopup()
private void
onRenew()
private void
pendingButtonPress(Button p_237598_1_)
private void
pingRegions()
void
play(RealmsServer p_223911_1_, Screen p_223911_2_)
private int
popupX0()
private int
popupY0()
void
removed()
void
removeSelection()
private void
removeServer(RealmsServer p_243059_1_)
void
render(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_)
private void
renderLocal(MatrixStack p_237604_1_)
private void
renderMoreInfo(MatrixStack p_237580_1_, int p_237580_2_, int p_237580_3_, int p_237580_4_, int p_237580_5_, boolean p_237580_6_)
protected void
renderMousehoverTooltip(MatrixStack p_237583_1_, java.util.List<ITextComponent> p_237583_2_, int p_237583_3_, int p_237583_4_)
private void
renderNews(MatrixStack p_237582_1_, int p_237582_2_, int p_237582_3_, boolean p_237582_4_, int p_237582_5_, int p_237582_6_, boolean p_237582_7_, boolean p_237582_8_)
private void
renderStage(MatrixStack p_237613_1_)
private void
saveListScrollPosition()
private void
setTooltip(ITextComponent... p_237603_1_)
private boolean
shouldConfigureButtonBeVisible(RealmsServer p_223941_1_)
private boolean
shouldLeaveButtonBeVisible(RealmsServer p_223959_1_)
private boolean
shouldPlayButtonBeActive(RealmsServer p_223897_1_)
private boolean
shouldRenewButtonBeActive(RealmsServer p_223920_1_)
private boolean
shouldShowMessageInList()
boolean
shouldShowPopup()
private boolean
shouldShowPopupButton()
private void
stopRealmsFetcher()
private void
switchToLocal()
private void
switchToProd()
private void
switchToStage()
void
tick()
private void
updateButtonStates(RealmsServer p_223915_1_)
static void
updateTeaserImages(IResourceManager p_227932_0_)
-
Methods inherited from class net.minecraft.realms.RealmsScreen
narrateLabels, row
-
Methods inherited from class net.minecraft.client.gui.screen.Screen
addButton, addWidget, children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, onClose, onFilesDrop, renderBackground, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderToolTip, renderWrappedToolTip, resize, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenError
-
Methods inherited from class net.minecraft.client.gui.FocusableGui
getFocused, isDragging, setDragging, setFocused
-
Methods inherited from class net.minecraft.client.gui.AbstractGui
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine
-
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.IGuiEventListener
mouseMoved
-
Methods inherited from interface net.minecraft.client.gui.INestedGuiEventHandler
changeFocus, getChildAt, keyReleased, magicalSpecialHackyFocus, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
ON_ICON_LOCATION
private static final ResourceLocation ON_ICON_LOCATION
-
OFF_ICON_LOCATION
private static final ResourceLocation OFF_ICON_LOCATION
-
EXPIRED_ICON_LOCATION
private static final ResourceLocation EXPIRED_ICON_LOCATION
-
EXPIRES_SOON_ICON_LOCATION
private static final ResourceLocation EXPIRES_SOON_ICON_LOCATION
-
LEAVE_ICON_LOCATION
private static final ResourceLocation LEAVE_ICON_LOCATION
-
INVITATION_ICONS_LOCATION
private static final ResourceLocation INVITATION_ICONS_LOCATION
-
INVITE_ICON_LOCATION
private static final ResourceLocation INVITE_ICON_LOCATION
-
WORLDICON_LOCATION
private static final ResourceLocation WORLDICON_LOCATION
-
LOGO_LOCATION
private static final ResourceLocation LOGO_LOCATION
-
CONFIGURE_LOCATION
private static final ResourceLocation CONFIGURE_LOCATION
-
QUESTIONMARK_LOCATION
private static final ResourceLocation QUESTIONMARK_LOCATION
-
NEWS_LOCATION
private static final ResourceLocation NEWS_LOCATION
-
POPUP_LOCATION
private static final ResourceLocation POPUP_LOCATION
-
DARKEN_LOCATION
private static final ResourceLocation DARKEN_LOCATION
-
CROSS_ICON_LOCATION
private static final ResourceLocation CROSS_ICON_LOCATION
-
TRIAL_ICON_LOCATION
private static final ResourceLocation TRIAL_ICON_LOCATION
-
BUTTON_LOCATION
private static final ResourceLocation BUTTON_LOCATION
-
NO_PENDING_INVITES_TEXT
private static final ITextComponent NO_PENDING_INVITES_TEXT
-
PENDING_INVITES_TEXT
private static final ITextComponent PENDING_INVITES_TEXT
-
TRIAL_MESSAGE_LINES
private static final java.util.List<ITextComponent> TRIAL_MESSAGE_LINES
-
SERVER_UNITIALIZED_TEXT
private static final ITextComponent SERVER_UNITIALIZED_TEXT
-
SUBSCRIPTION_EXPIRED_TEXT
private static final ITextComponent SUBSCRIPTION_EXPIRED_TEXT
-
SUBSCRIPTION_RENEW_TEXT
private static final ITextComponent SUBSCRIPTION_RENEW_TEXT
-
TRIAL_EXPIRED_TEXT
private static final ITextComponent TRIAL_EXPIRED_TEXT
-
SUBSCRIPTION_CREATE_TEXT
private static final ITextComponent SUBSCRIPTION_CREATE_TEXT
-
SELECT_MINIGAME_PREFIX
private static final ITextComponent SELECT_MINIGAME_PREFIX
-
POPUP_TEXT
private static final ITextComponent POPUP_TEXT
-
SERVER_EXPIRED_TOOLTIP
private static final ITextComponent SERVER_EXPIRED_TOOLTIP
-
SERVER_EXPIRES_SOON_TOOLTIP
private static final ITextComponent SERVER_EXPIRES_SOON_TOOLTIP
-
SERVER_EXPIRES_IN_DAY_TOOLTIP
private static final ITextComponent SERVER_EXPIRES_IN_DAY_TOOLTIP
-
SERVER_OPEN_TOOLTIP
private static final ITextComponent SERVER_OPEN_TOOLTIP
-
SERVER_CLOSED_TOOLTIP
private static final ITextComponent SERVER_CLOSED_TOOLTIP
-
LEAVE_SERVER_TOOLTIP
private static final ITextComponent LEAVE_SERVER_TOOLTIP
-
CONFIGURE_SERVER_TOOLTIP
private static final ITextComponent CONFIGURE_SERVER_TOOLTIP
-
SERVER_INFO_TOOLTIP
private static final ITextComponent SERVER_INFO_TOOLTIP
-
NEWS_TOOLTIP
private static final ITextComponent NEWS_TOOLTIP
-
teaserImages
private static java.util.List<ResourceLocation> teaserImages
-
REALMS_DATA_FETCHER
private static final RealmsDataFetcher REALMS_DATA_FETCHER
-
overrideConfigure
private static boolean overrideConfigure
-
lastScrollYPosition
private static int lastScrollYPosition
-
hasParentalConsent
private static volatile boolean hasParentalConsent
-
checkedParentalConsent
private static volatile boolean checkedParentalConsent
-
checkedClientCompatability
private static volatile boolean checkedClientCompatability
-
realmsGenericErrorScreen
private static Screen realmsGenericErrorScreen
-
regionsPinged
private static boolean regionsPinged
-
inviteNarrationLimiter
private final com.google.common.util.concurrent.RateLimiter inviteNarrationLimiter
-
dontSetConnectedToRealms
private boolean dontSetConnectedToRealms
-
lastScreen
private final Screen lastScreen
-
realmSelectionList
private volatile RealmsMainScreen.ServerList realmSelectionList
-
selectedServerId
private long selectedServerId
-
playButton
private Button playButton
-
backButton
private Button backButton
-
renewButton
private Button renewButton
-
configureButton
private Button configureButton
-
leaveButton
private Button leaveButton
-
toolTip
private java.util.List<ITextComponent> toolTip
-
realmsServers
private java.util.List<RealmsServer> realmsServers
-
numberOfPendingInvites
private volatile int numberOfPendingInvites
-
animTick
private int animTick
-
hasFetchedServers
private boolean hasFetchedServers
-
popupOpenedByUser
private boolean popupOpenedByUser
-
justClosedPopup
private boolean justClosedPopup
-
trialsAvailable
private volatile boolean trialsAvailable
-
createdTrial
private volatile boolean createdTrial
-
showingPopup
private volatile boolean showingPopup
-
hasUnreadNews
private volatile boolean hasUnreadNews
-
newsLink
private volatile java.lang.String newsLink
-
carouselIndex
private int carouselIndex
-
carouselTick
private int carouselTick
-
hasSwitchedCarouselImage
private boolean hasSwitchedCarouselImage
-
keyCombos
private java.util.List<KeyCombo> keyCombos
-
clicks
private int clicks
-
connectLock
private java.util.concurrent.locks.ReentrantLock connectLock
-
formattedPopup
private IBidiRenderer formattedPopup
-
hoveredElement
private RealmsMainScreen.ServerState hoveredElement
-
showPopupButton
private Button showPopupButton
-
pendingInvitesButton
private Button pendingInvitesButton
-
newsButton
private Button newsButton
-
createTrialButton
private Button createTrialButton
-
buyARealmButton
private Button buyARealmButton
-
closeButton
private Button closeButton
-
-
Constructor Detail
-
RealmsMainScreen
public RealmsMainScreen(Screen p_i232181_1_)
-
-
Method Detail
-
shouldShowMessageInList
private boolean shouldShowMessageInList()
-
shouldShowPopup
public boolean shouldShowPopup()
-
hasParentalConsent
private static boolean hasParentalConsent()
-
addButtons
public void addButtons()
-
updateButtonStates
private void updateButtonStates(@Nullable RealmsServer p_223915_1_)
-
shouldShowPopupButton
private boolean shouldShowPopupButton()
-
shouldPlayButtonBeActive
private boolean shouldPlayButtonBeActive(@Nullable RealmsServer p_223897_1_)
-
shouldRenewButtonBeActive
private boolean shouldRenewButtonBeActive(@Nullable RealmsServer p_223920_1_)
-
shouldConfigureButtonBeVisible
private boolean shouldConfigureButtonBeVisible(@Nullable RealmsServer p_223941_1_)
-
shouldLeaveButtonBeVisible
private boolean shouldLeaveButtonBeVisible(@Nullable RealmsServer p_223959_1_)
-
tick
public void tick()
- Specified by:
tick
in interfaceIScreen
- Overrides:
tick
in classRealmsScreen
-
pingRegions
private void pingRegions()
-
getOwnedNonExpiredWorldIds
private java.util.List<java.lang.Long> getOwnedNonExpiredWorldIds()
-
onRenew
private void onRenew()
-
checkClientCompatability
private void checkClientCompatability()
-
checkUnreadNews
private void checkUnreadNews()
-
checkParentalConsent
private void checkParentalConsent()
-
switchToStage
private void switchToStage()
-
switchToLocal
private void switchToLocal()
-
switchToProd
private void switchToProd()
-
stopRealmsFetcher
private void stopRealmsFetcher()
-
configureClicked
private void configureClicked(RealmsServer p_223966_1_)
-
leaveClicked
private void leaveClicked(@Nullable RealmsServer p_223906_1_)
-
saveListScrollPosition
private void saveListScrollPosition()
-
findServer
@Nullable private RealmsServer findServer(long p_223967_1_)
-
leaveServer
private void leaveServer(boolean p_237625_1_)
-
removeServer
private void removeServer(RealmsServer p_243059_1_)
-
removeSelection
public void removeSelection()
-
keyPressed
public boolean keyPressed(int p_231046_1_, int p_231046_2_, int p_231046_3_)
- Specified by:
keyPressed
in interfaceIGuiEventListener
- Specified by:
keyPressed
in interfaceINestedGuiEventHandler
- Overrides:
keyPressed
in classScreen
-
onClosePopup
private void onClosePopup()
-
charTyped
public boolean charTyped(char p_231042_1_, int p_231042_2_)
-
render
public void render(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_)
- Specified by:
render
in interfaceIRenderable
- Overrides:
render
in classScreen
-
drawRealmsLogo
private void drawRealmsLogo(MatrixStack p_237579_1_, int p_237579_2_, int p_237579_3_)
-
mouseClicked
public boolean mouseClicked(double p_231044_1_, double p_231044_3_, int p_231044_5_)
-
isOutsidePopup
private boolean isOutsidePopup(double p_223979_1_, double p_223979_3_)
-
drawPopup
private void drawPopup(MatrixStack p_237605_1_, int p_237605_2_, int p_237605_3_)
-
popupX0
private int popupX0()
-
popupY0
private int popupY0()
-
drawInvitationPendingIcon
private void drawInvitationPendingIcon(MatrixStack p_237581_1_, int p_237581_2_, int p_237581_3_, int p_237581_4_, int p_237581_5_, boolean p_237581_6_, boolean p_237581_7_)
-
inPendingInvitationArea
private boolean inPendingInvitationArea(double p_223931_1_, double p_223931_3_)
-
play
public void play(RealmsServer p_223911_1_, Screen p_223911_2_)
-
isSelfOwnedServer
private boolean isSelfOwnedServer(RealmsServer p_223885_1_)
-
isSelfOwnedNonExpiredServer
private boolean isSelfOwnedNonExpiredServer(RealmsServer p_223991_1_)
-
drawExpired
private void drawExpired(MatrixStack p_237614_1_, int p_237614_2_, int p_237614_3_, int p_237614_4_, int p_237614_5_)
-
drawExpiring
private void drawExpiring(MatrixStack p_237606_1_, int p_237606_2_, int p_237606_3_, int p_237606_4_, int p_237606_5_, int p_237606_6_)
-
drawOpen
private void drawOpen(MatrixStack p_237620_1_, int p_237620_2_, int p_237620_3_, int p_237620_4_, int p_237620_5_)
-
drawClose
private void drawClose(MatrixStack p_237626_1_, int p_237626_2_, int p_237626_3_, int p_237626_4_, int p_237626_5_)
-
drawLeave
private void drawLeave(MatrixStack p_237630_1_, int p_237630_2_, int p_237630_3_, int p_237630_4_, int p_237630_5_)
-
drawConfigure
private void drawConfigure(MatrixStack p_237633_1_, int p_237633_2_, int p_237633_3_, int p_237633_4_, int p_237633_5_)
-
renderMousehoverTooltip
protected void renderMousehoverTooltip(MatrixStack p_237583_1_, java.util.List<ITextComponent> p_237583_2_, int p_237583_3_, int p_237583_4_)
-
renderMoreInfo
private void renderMoreInfo(MatrixStack p_237580_1_, int p_237580_2_, int p_237580_3_, int p_237580_4_, int p_237580_5_, boolean p_237580_6_)
-
renderNews
private void renderNews(MatrixStack p_237582_1_, int p_237582_2_, int p_237582_3_, boolean p_237582_4_, int p_237582_5_, int p_237582_6_, boolean p_237582_7_, boolean p_237582_8_)
-
renderLocal
private void renderLocal(MatrixStack p_237604_1_)
-
renderStage
private void renderStage(MatrixStack p_237613_1_)
-
newScreen
public RealmsMainScreen newScreen()
-
updateTeaserImages
public static void updateTeaserImages(IResourceManager p_227932_0_)
-
setTooltip
private void setTooltip(ITextComponent... p_237603_1_)
-
pendingButtonPress
private void pendingButtonPress(Button p_237598_1_)
-
-