Class RealmsSlotOptionsScreen

All Implemented Interfaces:
Drawable, Element, ParentElement, TickableElement

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

    • DIFFICULTIES

      public static final Text[] DIFFICULTIES
    • GAME_MODES

      public static final Text[] GAME_MODES
    • field_24207

      private static final Text field_24207
    • field_24208

      private static final Text field_24208
    • field_25884

      private static final Text field_25884
    • field_26516

      private static final Text field_26516
    • nameEdit

      private TextFieldWidget nameEdit
    • parent

      protected final RealmsConfigureWorldScreen parent
    • column1_x

      private int column1_x
    • column_width

      private int column_width
    • column2_x

      private int column2_x
    • options

      private final RealmsWorldOptions options
    • worldType

      private final RealmsServer.WorldType worldType
    • activeSlot

      private final int activeSlot
    • difficultyIndex

      private int difficultyIndex
    • gameModeIndex

      private int gameModeIndex
    • pvp

      private Boolean pvp
    • spawnNPCs

      private Boolean spawnNPCs
    • spawnAnimals

      private Boolean spawnAnimals
    • spawnMonsters

      private Boolean spawnMonsters
    • spawnProtection

      private Integer spawnProtection
    • commandBlocks

      private Boolean commandBlocks
    • forceGameMode

      private Boolean forceGameMode
    • pvpButton

      private ButtonWidget pvpButton
    • spawnAnimalsButton

      private ButtonWidget spawnAnimalsButton
    • spawnMonstersButton

      private ButtonWidget spawnMonstersButton
    • spawnNPCsButton

      private ButtonWidget spawnNPCsButton
    • spawnProtectionButton

      private RealmsSlotOptionsScreen.SettingsSlider spawnProtectionButton
    • commandBlocksButton

      private ButtonWidget commandBlocksButton
    • gameModeButton

      private ButtonWidget gameModeButton
    • titleLabel

      private RealmsLabel titleLabel
    • toastMessage

      private RealmsLabel toastMessage
  • Constructor Details

  • Method Details

    • removed

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

      public void tick()
      Specified by:
      tick in interface TickableElement
      Overrides:
      tick in class RealmsScreen
    • 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 {@linkplain https://www.glfw.org/docs/3.3/group__mods.html 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)
    • 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
    • difficultyTitle

      private Text difficultyTitle()
    • gameModeTitle

      private Text gameModeTitle()
    • pvpTitle

      private Text pvpTitle()
    • spawnAnimalsTitle

      private Text spawnAnimalsTitle()
    • spawnMonstersTitle

      private Text spawnMonstersTitle()
    • spawnNPCsTitle

      private Text spawnNPCsTitle()
    • commandBlocksTitle

      private Text commandBlocksTitle()
    • forceGameModeTitle

      private Text forceGameModeTitle()
    • getWorldConfigureMessage

      private static Text getWorldConfigureMessage​(boolean enabled)
    • render

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

      private String getSlotName()
    • saveSettings

      private void saveSettings()