Class RealmsSlotOptionsScreen

All Implemented Interfaces:
Drawable, Element, ParentElement, TickableElement

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

    • DIFFICULTIES

      public static final List<Difficulty> DIFFICULTIES
    • GAME_MODES

      public static final List<GameMode> GAME_MODES
    • field_26516

      private static final Text field_26516
    • field_27942

      private static final Text field_27942
    • nameEdit

      private TextFieldWidget nameEdit
    • parent

      protected final RealmsConfigureWorldScreen parent
    • column1_x

      private int column1_x
    • column2_x

      private int column2_x
    • options

      private final RealmsWorldOptions options
    • worldType

      private final RealmsServer.WorldType worldType
    • activeSlot

      private final int activeSlot
    • field_27943

      private Difficulty field_27943
    • gameModeIndex

      private GameMode gameModeIndex
    • pvp

      private boolean pvp
    • spawnNPCs

      private boolean spawnNPCs
    • spawnAnimals

      private boolean spawnAnimals
    • spawnMonsters

      private boolean spawnMonsters
    • difficultyIndex

      private int difficultyIndex
    • commandBlocks

      private boolean commandBlocks
    • forceGameMode

      private boolean forceGameMode
    • spawnProtectionButton

      private RealmsSlotOptionsScreen.SettingsSlider spawnProtectionButton
    • 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 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)
    • method_32498

      private static <T> T method_32498​(List<T> list, int int2, int int3)
    • method_32499

      private static <T> int method_32499​(List<T> list, T t, int int2)
    • 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
    • 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()