Class RealmsMainScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement

public class RealmsMainScreen extends RealmsScreen
  • Field Details

    • INFO_SPRITE

      static final ResourceLocation INFO_SPRITE
    • NEW_REALM_SPRITE

      static final ResourceLocation NEW_REALM_SPRITE
    • EXPIRED_SPRITE

      static final ResourceLocation EXPIRED_SPRITE
    • EXPIRES_SOON_SPRITE

      static final ResourceLocation EXPIRES_SOON_SPRITE
    • OPEN_SPRITE

      static final ResourceLocation OPEN_SPRITE
    • CLOSED_SPRITE

      static final ResourceLocation CLOSED_SPRITE
    • INVITE_SPRITE

      private static final ResourceLocation INVITE_SPRITE
    • NEWS_SPRITE

      private static final ResourceLocation NEWS_SPRITE
    • LOGGER

      static final org.slf4j.Logger LOGGER
    • LOGO_LOCATION

      private static final ResourceLocation LOGO_LOCATION
    • NO_REALMS_LOCATION

      private static final ResourceLocation NO_REALMS_LOCATION
    • TITLE

      private static final Component TITLE
    • LOADING_TEXT

      private static final Component LOADING_TEXT
    • SERVER_UNITIALIZED_TEXT

      static final Component SERVER_UNITIALIZED_TEXT
    • SUBSCRIPTION_EXPIRED_TEXT

      static final Component SUBSCRIPTION_EXPIRED_TEXT
    • SUBSCRIPTION_RENEW_TEXT

      private static final Component SUBSCRIPTION_RENEW_TEXT
    • TRIAL_EXPIRED_TEXT

      static final Component TRIAL_EXPIRED_TEXT
    • PLAY_TEXT

      private static final Component PLAY_TEXT
    • LEAVE_SERVER_TEXT

      private static final Component LEAVE_SERVER_TEXT
    • CONFIGURE_SERVER_TEXT

      private static final Component CONFIGURE_SERVER_TEXT
    • SERVER_EXPIRED_TOOLTIP

      static final Component SERVER_EXPIRED_TOOLTIP
    • SERVER_EXPIRES_SOON_TOOLTIP

      static final Component SERVER_EXPIRES_SOON_TOOLTIP
    • SERVER_EXPIRES_IN_DAY_TOOLTIP

      static final Component SERVER_EXPIRES_IN_DAY_TOOLTIP
    • SERVER_OPEN_TOOLTIP

      static final Component SERVER_OPEN_TOOLTIP
    • SERVER_CLOSED_TOOLTIP

      static final Component SERVER_CLOSED_TOOLTIP
    • UNITIALIZED_WORLD_NARRATION

      static final Component UNITIALIZED_WORLD_NARRATION
    • NO_REALMS_TEXT

      private static final Component NO_REALMS_TEXT
    • NO_PENDING_INVITES

      private static final Component NO_PENDING_INVITES
    • PENDING_INVITES

      private static final Component PENDING_INVITES
    • INCOMPATIBLE_POPUP_TITLE

      private static final Component INCOMPATIBLE_POPUP_TITLE
    • INCOMPATIBLE_RELEASE_TYPE_POPUP_MESSAGE

      private static final Component 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:
    • 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

      private final CompletableFuture<RealmsAvailability.Result> availability
    • dataSubscription

      @Nullable private DataFetcher.Subscription dataSubscription
    • handledSeenNotifications

      private final Set<UUID> handledSeenNotifications
    • regionsPinged

      private static boolean regionsPinged
    • inviteNarrationLimiter

      private final com.google.common.util.concurrent.RateLimiter inviteNarrationLimiter
    • lastScreen

      private final Screen lastScreen
    • playButton

      private Button playButton
    • backButton

      private Button backButton
    • renewButton

      private Button renewButton
    • configureButton

      private Button configureButton
    • leaveButton

      private Button leaveButton
    • realmSelectionList

    • serverList

      private RealmsServerList serverList
    • availableSnapshotServers

      private List<RealmsServer> availableSnapshotServers
    • onlinePlayersPerRealm

      RealmsServerPlayerLists onlinePlayersPerRealm
    • trialsAvailable

      private volatile boolean trialsAvailable
    • lastClickTime

      long lastClickTime
    • notifications

      private final List<RealmsNotification> notifications
    • addRealmButton

      private Button addRealmButton
    • pendingInvitesButton

      private RealmsMainScreen.NotificationButton pendingInvitesButton
    • newsButton

    • activeLayoutState

      private RealmsMainScreen.LayoutState activeLayoutState
    • layout

      @Nullable private HeaderAndFooterLayout layout
  • Constructor Details

    • RealmsMainScreen

      public RealmsMainScreen(Screen p_86315_)
  • Method Details

    • init

      public void init()
      Overrides:
      init in class Screen
    • isSnapshot

      public static boolean isSnapshot()
    • repositionElements

      protected void repositionElements()
      Overrides:
      repositionElements in class Screen
    • onClose

      public void onClose()
      Overrides:
      onClose in class Screen
    • updateLayout

      private void updateLayout()
    • updateLayout

      private void updateLayout(RealmsMainScreen.LayoutState p_294474_)
    • createLayout

      private HeaderAndFooterLayout createLayout(RealmsMainScreen.LayoutState p_295052_)
    • createHeader

      private Layout createHeader()
    • createFooter

      private Layout createFooter(RealmsMainScreen.LayoutState p_294561_)
    • createNoRealmsContent

      private LinearLayout createNoRealmsContent()
    • updateButtonStates

      void updateButtonStates()
    • shouldPlayButtonBeActive

      boolean shouldPlayButtonBeActive(RealmsServer p_86563_)
    • shouldRenewButtonBeActive

      private boolean shouldRenewButtonBeActive(RealmsServer p_86595_)
    • shouldConfigureButtonBeActive

      private boolean shouldConfigureButtonBeActive(RealmsServer p_86620_)
    • shouldLeaveButtonBeActive

      private boolean shouldLeaveButtonBeActive(RealmsServer p_86645_)
    • tick

      public void tick()
      Overrides:
      tick in class Screen
    • refreshPendingInvites

      public static void refreshPendingInvites()
    • refreshServerList

      public static void refreshServerList()
    • debugRefreshDataFetchers

      private void debugRefreshDataFetchers()
    • initDataFetcher

      private DataFetcher.Subscription initDataFetcher(RealmsDataFetcher p_238836_)
    • markNotificationsAsSeen

      private void markNotificationsAsSeen(Collection<RealmsNotification> p_304698_)
    • callRealmsClient

      private static <T> void callRealmsClient(RealmsMainScreen.RealmsCall<T> p_275561_, Consumer<T> p_275686_)
    • refreshListAndLayout

      private void refreshListAndLayout()
    • addListEntriesForNotification

      private boolean addListEntriesForNotification(RealmsNotification p_304511_)
    • pingRegions

      private void pingRegions()
    • getOwnedNonExpiredRealmIds

      private List<Long> getOwnedNonExpiredRealmIds()
    • onRenew

      private void onRenew(@Nullable RealmsServer p_193500_)
    • configureClicked

      private void configureClicked(@Nullable RealmsServer p_86657_)
    • leaveClicked

      private void leaveClicked(@Nullable RealmsServer p_86670_)
    • getSelectedServer

      @Nullable private RealmsServer getSelectedServer()
    • leaveServer

      private void leaveServer(RealmsServer p_193495_)
    • dismissNotification

      void dismissNotification(UUID p_275349_)
    • resetScreen

      public void resetScreen()
    • getNarrationMessage

      public Component getNarrationMessage()
      Overrides:
      getNarrationMessage in class Screen
    • render

      public void render(GuiGraphics p_282736_, int p_283347_, int p_282480_, float p_283485_)
      Description copied from class: Screen
      Neo: mixins targeting this method won't fire for container screens as AbstractContainerScreen.render(net.minecraft.client.gui.GuiGraphics, int, int, float) replicates this method in place of a super call to insert an event
      Specified by:
      render in interface Renderable
      Overrides:
      render in class Screen
    • openTrialAvailablePopup

      private void openTrialAvailablePopup()
    • play

      public static void play(@Nullable RealmsServer p_86516_, Screen p_86517_)
    • play

      public static void play(@Nullable RealmsServer p_305964_, Screen p_305959_, boolean p_306296_)
    • confirmToPlay

      private static void confirmToPlay(RealmsServer p_305792_, Screen p_306263_, Component p_305782_, Component p_306311_, Component p_306238_)
    • upgradeRealmAndPlay

      private static void upgradeRealmAndPlay(RealmsServer p_350306_, Screen p_351001_)
    • getVersionComponent

      public static Component getVersionComponent(String p_307541_, boolean p_307256_)
    • getVersionComponent

      public static Component getVersionComponent(String p_307429_, int p_307536_)
    • isSelfOwnedServer

      static boolean isSelfOwnedServer(RealmsServer p_86684_)
    • isSelfOwnedNonExpiredServer

      private boolean isSelfOwnedNonExpiredServer(RealmsServer p_86689_)
    • renderEnvironment

      private void renderEnvironment(GuiGraphics p_294591_, String p_295050_, int p_294351_)