Class RealmsMainScreen
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.AbstractParentElement
net.minecraft.client.gui.screen.Screen
net.minecraft.client.realms.gui.screen.RealmsScreen
net.minecraft.client.realms.gui.screen.RealmsMainScreen
- All Implemented Interfaces:
Drawable,Element,ParentElement,TickableElement
@Environment(CLIENT) public class RealmsMainScreen extends RealmsScreen
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classRealmsMainScreen.CloseButton(package private) classRealmsMainScreen.Entry(package private) static classRealmsMainScreen.HoverState(package private) classRealmsMainScreen.NewsButton(package private) classRealmsMainScreen.PendingInvitesButton(package private) classRealmsMainScreen.RealmSelectionList(package private) classRealmsMainScreen.RealmSelectionListEntry(package private) classRealmsMainScreen.RealmSelectionListTrialEntry(package private) classRealmsMainScreen.ShowPopupButton -
Field Summary
Fields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, widthFields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE -
Constructor Summary
Constructors Constructor Description RealmsMainScreen(Screen screen) -
Method Summary
Modifier and Type Method Description voidaddButtons()booleancharTyped(char chr, int keyCode)Callback for when a character input has been captured.private voidcheckClientCompatability()private voidcheckParentalConsent()private voidcheckUnreadNews()private voidconfigureClicked(RealmsServer realmsServer)private voiddrawClose(MatrixStack matrixStack, int int2, int int3, int int4, int int5)private voiddrawConfigure(MatrixStack matrixStack, int int2, int int3, int int4, int int5)private voiddrawExpired(MatrixStack matrixStack, int int2, int int3, int int4, int int5)private voiddrawInvitationPendingIcon(MatrixStack matrixStack, int int2, int int3, int int4, int int5, boolean bool, boolean bool2)private voiddrawLeave(MatrixStack matrixStack, int int2, int int3, int int4, int int5)private voiddrawOpen(MatrixStack matrixStack, int int2, int int3, int int4, int int5)private voiddrawPopup(MatrixStack matrices, int mouseX, int mouseY)private voiddrawRealmsLogo(MatrixStack matrices, int x, int y)private RealmsServerfindServer(long id)private List<Long>getOwnedNonExpiredWorldIds()private static booleanhasParentalConsent()voidinit()Called when a screen should be initialized.private booleaninPendingInvitationArea(double xm, double ym)private booleanisOutsidePopup(double xm, double ym)private booleanisSelfOwnedServer(RealmsServer serverData)booleankeyPressed(int keyCode, int scanCode, int modifiers)Callback for when a key down event has been captured.private voidleaveClicked(RealmsServer selectedServer)static voidmethod_23765(ResourceManager manager)private voidmethod_24985(ButtonWidget buttonWidget)private voidmethod_24987(MatrixStack matrixStack, int int2, int int3, int int4, int int5, int int6)private voidmethod_24991(boolean bool)private booleanmethod_25001(RealmsServer realmsServer)private voidmethod_27452(Text[] text)private voidmethod_31174(RealmsServer realmsServer)booleanmouseClicked(double mouseX, double mouseY, int button)Callback for when a mouse button down event has been captured.RealmsMainScreennewScreen()private voidonClosePopup()private voidonRenew()private voidpingRegions()voidplay(RealmsServer realmsServer, Screen screen)private intpopupX0()private intpopupY0()voidremoved()voidremoveSelection()voidrender(MatrixStack matrices, int mouseX, int mouseY, float delta)private voidrenderLocal(MatrixStack matrixStack)private voidrenderMoreInfo(MatrixStack matrixStack, int int2, int int3, int int4, int int5, boolean bool)protected voidrenderMousehoverTooltip(MatrixStack matrixStack, List<Text> list, int int2, int int3)private voidrenderNews(MatrixStack matrixStack, int int2, int int3, boolean bool, int int4, int int5, boolean bool2, boolean bool3)private voidrenderStage(MatrixStack matrixStack)private voidsaveListScrollPosition()private booleanshouldConfigureButtonBeVisible(RealmsServer server)private booleanshouldLeaveButtonBeVisible(RealmsServer server)private booleanshouldPlayButtonBeActive(RealmsServer server)private booleanshouldRenewButtonBeActive(RealmsServer server)private booleanshouldShowMessageInList()booleanshouldShowPopup()private booleanshouldShowPopupButton()private voidstopRealmsFetcher()private voidswitchToLocal()private voidswitchToProd()private voidswitchToStage()voidtick()private voidupdateButtonStates(RealmsServer server)Methods inherited from class net.minecraft.client.realms.gui.screen.RealmsScreen
narrateLabels, rowMethods inherited from class net.minecraft.client.gui.screen.Screen
addButton, addChild, children, filesDragged, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, onClose, renderBackground, renderBackground, renderBackgroundTexture, renderOrderedTooltip, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocusedMethods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, method_33284, setZOffsetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.Element
mouseMovedMethods inherited from interface net.minecraft.client.gui.ParentElement
changeFocus, focusOn, hoveredElement, keyReleased, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
Field Details
-
LOGGER
-
ON_ICON
-
OFF_ICON
-
EXPIRED_ICON
-
EXPIRES_SOON_ICON
-
LEAVE_ICON
-
INVITATION_ICON
-
INVITE_ICON
-
WORLD_ICON
-
REALMS
-
CONFIGURE_ICON
-
QUESTIONMARK
-
NEWS_ICON
-
POPUP
-
DARKEN
-
CROSS_ICON
-
TRIAL_ICON
-
WIDGETS
-
NO_PENDING_TEXT
-
PENDING_TEXT
-
TRIAL_MESSAGE_LINES
-
UNINITIALIZED_TEXT
-
EXPIRED_LIST_TEXT
-
EXPIRED_RENEW_TEXT
-
EXPIRED_TRIAL_TEXT
-
EXPIRED_SUBSCRIBE_TEXT
-
MINIGAME_TEXT
-
POPUP_TEXT
-
EXPIRED_TEXT
-
EXPIRES_SOON_TEXT
-
EXPIRES_IN_A_DAY_TEXT
-
OPEN_TEXT
-
CLOSED_TEXT
-
LEAVE_TEXT
-
CONFIGURE_TEXT
-
INFO_TEXT
-
NEWS_TEXT
-
IMAGES
-
realmsDataFetcher
-
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
-
regionsPinged
private static boolean regionsPinged -
rateLimiter
-
dontSetConnectedToRealms
private boolean dontSetConnectedToRealms -
lastScreen
-
realmSelectionList
-
selectedServerId
private long selectedServerId -
playButton
-
backButton
-
renewButton
-
configureButton
-
leaveButton
-
toolTip
-
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
-
carouselIndex
private int carouselIndex -
carouselTick
private int carouselTick -
hasSwitchedCarouselImage
private boolean hasSwitchedCarouselImage -
keyCombos
-
clicks
private int clicks -
connectLock
-
field_26466
-
hoverState
-
showPopupButton
-
pendingInvitesButton
-
newsButton
-
createTrialButton
-
buyARealmButton
-
closeButton
-
-
Constructor Details
-
RealmsMainScreen
-
-
Method Details
-
shouldShowMessageInList
private boolean shouldShowMessageInList() -
shouldShowPopup
public boolean shouldShowPopup() -
init
public void init()Called when a screen should be initialized.This method is called when this screen is opened or resized.
-
hasParentalConsent
private static boolean hasParentalConsent() -
addButtons
public void addButtons() -
updateButtonStates
-
shouldShowPopupButton
private boolean shouldShowPopupButton() -
shouldPlayButtonBeActive
-
shouldRenewButtonBeActive
-
shouldConfigureButtonBeVisible
-
shouldLeaveButtonBeVisible
-
tick
public void tick()- Specified by:
tickin interfaceTickableElement- Overrides:
tickin classRealmsScreen
-
pingRegions
private void pingRegions() -
getOwnedNonExpiredWorldIds
-
removed
public void removed() -
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
-
leaveClicked
-
saveListScrollPosition
private void saveListScrollPosition() -
findServer
-
method_24991
private void method_24991(boolean bool) -
method_31174
-
removeSelection
public void removeSelection() -
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers)Callback for when a key down event has been captured. The key code is identified by the constants inGLFWclass.- Specified by:
keyPressedin interfaceElement- Specified by:
keyPressedin interfaceParentElement- Overrides:
keyPressedin classScreen- Parameters:
keyCode- the named key code of the event as described in theGLFWclassscanCode- the unique/platform-specific scan code of the keyboard inputmodifiers- a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)- Returns:
trueto indicate that the event handling is successful/valid- See Also:
Keyboard.onKey(long, int, int, int, int),GLFW.GLFW_KEY_Q,GLFWKeyCallbackI.invoke(long, int, int, int, int)
-
onClosePopup
private void onClosePopup() -
charTyped
public boolean charTyped(char chr, int keyCode)Callback for when a character input has been captured. The key code is identified by the constants inGLFWclass.- Parameters:
chr- the captured characterkeyCode- the associated key code- Returns:
trueto indicate that the event handling is successful/valid- See Also:
Keyboard.onChar(long, int, int),GLFW.GLFW_KEY_Q,GLFWKeyCallbackI.invoke(long, int, int, int, int)
-
render
-
drawRealmsLogo
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button)Callback for when a mouse button down event has been captured. The button number is identified by the constants inGLFWclass.- Parameters:
mouseX- the X coordinate of the mousemouseY- the Y coordinate of the mousebutton- the mouse button number- Returns:
trueto indicate that the event handling is successful/valid- See Also:
Mouse.onMouseButton(long, int, int, int),GLFW.GLFW_MOUSE_BUTTON_1
-
isOutsidePopup
private boolean isOutsidePopup(double xm, double ym) -
drawPopup
-
popupX0
private int popupX0() -
popupY0
private int popupY0() -
drawInvitationPendingIcon
private void drawInvitationPendingIcon(MatrixStack matrixStack, int int2, int int3, int int4, int int5, boolean bool, boolean bool2) -
inPendingInvitationArea
private boolean inPendingInvitationArea(double xm, double ym) -
play
-
isSelfOwnedServer
-
method_25001
-
drawExpired
-
method_24987
private void method_24987(MatrixStack matrixStack, int int2, int int3, int int4, int int5, int int6) -
drawOpen
-
drawClose
-
drawLeave
-
drawConfigure
-
renderMousehoverTooltip
protected void renderMousehoverTooltip(MatrixStack matrixStack, List<Text> list, int int2, int int3) -
renderMoreInfo
private void renderMoreInfo(MatrixStack matrixStack, int int2, int int3, int int4, int int5, boolean bool) -
renderNews
private void renderNews(MatrixStack matrixStack, int int2, int int3, boolean bool, int int4, int int5, boolean bool2, boolean bool3) -
renderLocal
-
renderStage
-
newScreen
-
method_23765
-
method_27452
-
method_24985
-