Class RealmsConfigureWorldScreen

All Implemented Interfaces:
Drawable, Element, ParentElement, TickableElement

@Environment(CLIENT)
public class RealmsConfigureWorldScreen
extends RealmsScreen
  • Field Details

    • LOGGER

      private static final Logger LOGGER
    • ON_ICON

      private static final Identifier ON_ICON
    • OFF_ICON

      private static final Identifier OFF_ICON
    • EXPIRED_ICON

      private static final Identifier EXPIRED_ICON
    • EXPIRES_SOON_ICON

      private static final Identifier EXPIRES_SOON_ICON
    • WORLDS_TITLE

      private static final Text WORLDS_TITLE
    • CONFIGURE_REALM_TITLE

      private static final Text CONFIGURE_REALM_TITLE
    • CURRENT_MINIGAME_TEXT

      private static final Text CURRENT_MINIGAME_TEXT
    • EXPIRED_TEXT

      private static final Text EXPIRED_TEXT
    • EXPIRES_SOON_TEXT

      private static final Text EXPIRES_SOON_TEXT
    • EXPIRES_IN_A_DAY_TEXT

      private static final Text EXPIRES_IN_A_DAY_TEXT
    • OPEN_TEXT

      private static final Text OPEN_TEXT
    • CLOSED_TEXT

      private static final Text CLOSED_TEXT
    • toolTip

      @Nullable private Text toolTip
    • parent

      private final RealmsMainScreen parent
    • server

      @Nullable private RealmsServer server
    • serverId

      private final long serverId
    • left_x

      private int left_x
    • right_x

      private int right_x
    • playersButton

      private ButtonWidget playersButton
    • settingsButton

      private ButtonWidget settingsButton
    • subscriptionButton

      private ButtonWidget subscriptionButton
    • optionsButton

      private ButtonWidget optionsButton
    • backupButton

      private ButtonWidget backupButton
    • resetWorldButton

      private ButtonWidget resetWorldButton
    • switchMinigameButton

      private ButtonWidget switchMinigameButton
    • stateChanged

      private boolean stateChanged
    • animTick

      private int animTick
    • clicks

      private int clicks
  • Constructor Details

    • RealmsConfigureWorldScreen

      public RealmsConfigureWorldScreen​(RealmsMainScreen parent, long serverId)
  • Method Details

    • init

      public void init()
      Called when a screen should be initialized.

      This method is called when this screen is opened or resized.

      Overrides:
      init in class Screen
    • addSlotButton

      private void addSlotButton​(int slotIndex)
    • buttonLeft

      private int buttonLeft​(int i)
    • buttonCenter

      private int buttonCenter​(int i, int total)
    • tick

      public void tick()
      Specified by:
      tick in interface TickableElement
      Overrides:
      tick in class RealmsScreen
    • render

      public void render​(MatrixStack matrices, int mouseX, int mouseY, float delta)
      Specified by:
      render in interface Drawable
      Overrides:
      render in class Screen
    • frame

      private int frame​(int ordinal)
    • removed

      public void removed()
      Overrides:
      removed in class Screen
    • 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 in GLFW class.
      Specified by:
      keyPressed in interface Element
      Specified by:
      keyPressed in interface ParentElement
      Overrides:
      keyPressed in class Screen
      Parameters:
      keyCode - the named key code of the event as described in the GLFW class
      scanCode - the unique/platform-specific scan code of the keyboard input
      modifiers - a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)
      Returns:
      true to 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)
    • backButtonClicked

      private void backButtonClicked()
    • fetchServerData

      private void fetchServerData​(long worldId)
    • disableButtons

      private void disableButtons()
    • joinRealm

      private void joinRealm​(RealmsServer serverData)
    • switchToMinigame

      private void switchToMinigame()
    • switchToFullSlot

      private void switchToFullSlot​(int selectedSlot, RealmsServer serverData)
    • switchToEmptySlot

      private void switchToEmptySlot​(int selectedSlot, RealmsServer serverData)
    • renderMousehoverTooltip

      protected void renderMousehoverTooltip​(MatrixStack matrixStack, @Nullable Text text, int int2, int int3)
    • drawServerStatus

      private void drawServerStatus​(MatrixStack matrixStack, int int2, int int3, int int4, int int5)
    • drawExpired

      private void drawExpired​(MatrixStack matrixStack, int int2, int int3, int int4, int int5)
    • drawExpiring

      private void drawExpiring​(MatrixStack matrixStack, int int2, int int3, int int4, int int5, int int6)
    • drawOpen

      private void drawOpen​(MatrixStack matrixStack, int int2, int int3, int int4, int int5)
    • drawClosed

      private void drawClosed​(MatrixStack matrixStack, int int2, int int3, int int4, int int5)
    • isMinigame

      private boolean isMinigame()
    • hideRegularButtons

      private void hideRegularButtons()
    • removeButton

      private void removeButton​(ButtonWidget button)
    • addButton

      private void addButton​(ButtonWidget button)
    • hideMinigameButtons

      private void hideMinigameButtons()
    • saveSlotSettings

      public void saveSlotSettings​(RealmsWorldOptions options)
    • saveSettings

      public void saveSettings​(String name, String desc)
    • openTheWorld

      public void openTheWorld​(boolean join, Screen screen)
    • closeTheWorld

      public void closeTheWorld​(Screen screen)
    • stateChanged

      public void stateChanged()
    • method_32484

      private void method_32484​(@Nullable WorldTemplate worldTemplate)
    • getNewScreen

      public RealmsConfigureWorldScreen getNewScreen()