Class RealmsSlotOptionsScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement

public class RealmsSlotOptionsScreen extends RealmsScreen
  • Field Details

    • DEFAULT_DIFFICULTY

      private static final int DEFAULT_DIFFICULTY
      See Also:
    • DIFFICULTIES

      public static final List<Difficulty> DIFFICULTIES
    • DEFAULT_GAME_MODE

      private static final int DEFAULT_GAME_MODE
      See Also:
    • GAME_MODES

      public static final List<GameType> GAME_MODES
    • NAME_LABEL

      private static final Component NAME_LABEL
    • SPAWN_PROTECTION_TEXT

      static final Component SPAWN_PROTECTION_TEXT
    • nameEdit

      private EditBox nameEdit
    • parentScreen

      protected final RealmsConfigureWorldScreen parentScreen
    • column1X

      private int column1X
    • columnWidth

      private int columnWidth
    • options

      private final RealmsWorldOptions options
    • worldType

      private final RealmsServer.WorldType worldType
    • difficulty

      private Difficulty difficulty
    • gameMode

      private GameType gameMode
    • defaultSlotName

      private final String defaultSlotName
    • worldName

      private String worldName
    • pvp

      private boolean pvp
    • spawnNPCs

      private boolean spawnNPCs
    • spawnAnimals

      private boolean spawnAnimals
    • spawnMonsters

      private boolean spawnMonsters
    • spawnProtection

      int spawnProtection
    • commandBlocks

      private boolean commandBlocks
    • forceGameMode

      private boolean forceGameMode
    • spawnProtectionButton

  • Constructor Details

  • Method Details

    • onClose

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

      private static <T> T findByIndex(List<T> list, int index, int fallback)
    • findIndex

      private static <T> int findIndex(List<T> list, T object, int fallback)
    • init

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

      private CycleButton.OnValueChange<Boolean> confirmDangerousOption(Component question, Consumer<Boolean> onPress)
    • getNarrationMessage

      public Component getNarrationMessage()
      Overrides:
      getNarrationMessage in class Screen
    • 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.
    • setWorldName

      private void setWorldName(String name)
    • saveSettings

      private void saveSettings()