Class RealmsConfigureWorldScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement

public class RealmsConfigureWorldScreen extends RealmsScreen
  • Field Details

    • EXPIRED_SPRITE

      private static final ResourceLocation EXPIRED_SPRITE
    • EXPIRES_SOON_SPRITE

      private static final ResourceLocation EXPIRES_SOON_SPRITE
    • OPEN_SPRITE

      private static final ResourceLocation OPEN_SPRITE
    • CLOSED_SPRITE

      private static final ResourceLocation CLOSED_SPRITE
    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • WORLD_LIST_TITLE

      private static final Component WORLD_LIST_TITLE
    • TITLE

      private static final Component TITLE
    • SERVER_EXPIRED_TOOLTIP

      private static final Component SERVER_EXPIRED_TOOLTIP
    • SERVER_EXPIRING_SOON_TOOLTIP

      private static final Component SERVER_EXPIRING_SOON_TOOLTIP
    • SERVER_EXPIRING_IN_DAY_TOOLTIP

      private static final Component SERVER_EXPIRING_IN_DAY_TOOLTIP
    • SERVER_OPEN_TOOLTIP

      private static final Component SERVER_OPEN_TOOLTIP
    • SERVER_CLOSED_TOOLTIP

      private static final Component SERVER_CLOSED_TOOLTIP
    • DEFAULT_BUTTON_WIDTH

      private static final int DEFAULT_BUTTON_WIDTH
      See Also:
    • DEFAULT_BUTTON_OFFSET

      private static final int DEFAULT_BUTTON_OFFSET
      See Also:
    • toolTip

      @Nullable private Component toolTip
    • lastScreen

      private final RealmsMainScreen lastScreen
    • serverData

      @Nullable private RealmsServer serverData
    • serverId

      private final long serverId
    • leftX

      private int leftX
    • rightX

      private int rightX
    • playersButton

      private Button playersButton
    • settingsButton

      private Button settingsButton
    • subscriptionButton

      private Button subscriptionButton
    • optionsButton

      private Button optionsButton
    • backupButton

      private Button backupButton
    • resetWorldButton

      private Button resetWorldButton
    • switchMinigameButton

      private Button switchMinigameButton
    • stateChanged

      private boolean stateChanged
    • slotButtonList

      private final List<RealmsWorldSlotButton> slotButtonList
  • Constructor Details

    • RealmsConfigureWorldScreen

      public RealmsConfigureWorldScreen(RealmsMainScreen lastScreen, long serverId)
  • Method Details

    • init

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

      private RealmsWorldSlotButton addSlotButton(int index)
    • leftButton

      private int leftButton(int index)
    • centerButton

      private int centerButton(int row, int column)
    • render

      public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick)
      Renders the graphical user interface (GUI) element.
      Specified by:
      render in interface Renderable
      Overrides:
      render in class Screen
      Parameters:
      guiGraphics - the GuiGraphics object used for rendering.
      mouseX - the x-coordinate of the mouse cursor.
      mouseY - the y-coordinate of the mouse cursor.
      partialTick - the partial tick time.
    • frame

      private int frame(int index)
    • onClose

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

      private void fetchServerData(long serverId)
    • disableButtons

      private void disableButtons()
    • joinRealm

      private void joinRealm(RealmsServer server)
    • switchToMinigame

      private void switchToMinigame()
    • switchToFullSlot

      private void switchToFullSlot(int slot, RealmsServer server)
    • switchToEmptySlot

      private void switchToEmptySlot(int slot, RealmsServer server)
    • drawServerStatus

      private void drawServerStatus(GuiGraphics guiGraphics, int x, int y, int mouseX, int mouseY)
    • drawRealmStatus

      private void drawRealmStatus(GuiGraphics guiGraphics, int x, int y, int mouseX, int mouseY, ResourceLocation sprite, Supplier<Component> tooltipSupplier)
    • isMinigame

      private boolean isMinigame()
    • hideRegularButtons

      private void hideRegularButtons()
    • hide

      private void hide(Button button)
    • show

      private void show(Button button)
    • hideMinigameButtons

      private void hideMinigameButtons()
    • saveSlotSettings

      public void saveSlotSettings(RealmsWorldOptions worldOptions)
    • saveSettings

      public void saveSettings(String key, String value)
    • openTheWorld

      public void openTheWorld(boolean join)
    • closeTheWorld

      public void closeTheWorld()
    • stateChanged

      public void stateChanged()
    • templateSelectionCallback

      private void templateSelectionCallback(@Nullable WorldTemplate worldTemplate)
    • getNewScreen

      public RealmsConfigureWorldScreen getNewScreen()