Class CreateWorldScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Widget

public class CreateWorldScreen extends Screen
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • TEMP_WORLD_PREFIX

      private static final String TEMP_WORLD_PREFIX
      See Also:
    • GAME_MODEL_LABEL

      private static final Component GAME_MODEL_LABEL
    • SEED_LABEL

      private static final Component SEED_LABEL
    • SEED_INFO

      private static final Component SEED_INFO
    • NAME_LABEL

      private static final Component NAME_LABEL
    • OUTPUT_DIR_INFO

      private static final Component OUTPUT_DIR_INFO
    • COMMANDS_INFO

      private static final Component COMMANDS_INFO
    • PREPARING_WORLD_DATA

      private static final Component PREPARING_WORLD_DATA
    • lastScreen

      @Nullable private final Screen lastScreen
    • nameEdit

      private EditBox nameEdit
    • resultFolder

      String resultFolder
    • gameMode

    • oldGameMode

      @Nullable private CreateWorldScreen.SelectedGameMode oldGameMode
    • difficulty

      private Difficulty difficulty
    • commands

      private boolean commands
    • commandsChanged

      private boolean commandsChanged
    • hardCore

      public boolean hardCore
    • dataPacks

      protected DataPackConfig dataPacks
    • tempDataPackDir

      @Nullable private Path tempDataPackDir
    • tempDataPackRepository

      @Nullable private PackRepository tempDataPackRepository
    • worldGenSettingsVisible

      private boolean worldGenSettingsVisible
    • createButton

      private Button createButton
    • modeButton

    • difficultyButton

      private CycleButton<Difficulty> difficultyButton
    • moreOptionsButton

      private Button moreOptionsButton
    • gameRulesButton

      private Button gameRulesButton
    • dataPacksButton

      private Button dataPacksButton
    • commandsButton

      private CycleButton<Boolean> commandsButton
    • gameModeHelp1

      private Component gameModeHelp1
    • gameModeHelp2

      private Component gameModeHelp2
    • initName

      private String initName
    • gameRules

      private GameRules gameRules
    • worldGenSettingsComponent

      public final WorldGenSettingsComponent worldGenSettingsComponent
  • Constructor Details

  • Method Details

    • openFresh

      public static void openFresh(Minecraft p_232897_, @Nullable Screen p_232898_)
    • createFromExisting

      public static CreateWorldScreen createFromExisting(@Nullable Screen p_205427_, WorldStem p_205428_, @Nullable Path p_205429_)
    • tick

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

      protected void init()
      Overrides:
      init in class Screen
    • getEffectiveDifficulty

      private Difficulty getEffectiveDifficulty()
    • updateGameModeHelp

      private void updateGameModeHelp()
    • updateResultFolder

      private void updateResultFolder()
    • removed

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

      private static void queueLoadScreen(Minecraft p_232900_, Component p_232901_)
    • onCreate

      private void onCreate()
    • createNewWorld

      private void createNewWorld()
    • createLevelSettings

      private LevelSettings createLevelSettings(boolean p_205448_)
    • toggleWorldGenSettingsVisibility

      private void toggleWorldGenSettingsVisibility()
    • setGameMode

      private void setGameMode(CreateWorldScreen.SelectedGameMode p_100901_)
    • refreshWorldGenSettingsVisibility

      public void refreshWorldGenSettingsVisibility()
    • setWorldGenSettingsVisible

      private void setWorldGenSettingsVisible(boolean p_170197_)
    • keyPressed

      public boolean keyPressed(int p_100875_, int p_100876_, int p_100877_)
      Specified by:
      keyPressed in interface ContainerEventHandler
      Specified by:
      keyPressed in interface GuiEventListener
      Overrides:
      keyPressed in class Screen
    • onClose

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

      public void popScreen()
    • render

      public void render(PoseStack p_100890_, int p_100891_, int p_100892_, float p_100893_)
      Specified by:
      render in interface Widget
      Overrides:
      render in class Screen
    • addWidget

      protected <T extends GuiEventListener & NarratableEntry> T addWidget(T p_100948_)
      Overrides:
      addWidget in class Screen
    • addRenderableWidget

      protected <T extends GuiEventListener & Widget & NarratableEntry> T addRenderableWidget(T p_170199_)
      Overrides:
      addRenderableWidget in class Screen
    • getTempDataPackDir

      @Nullable private Path getTempDataPackDir()
    • openDataPackSelectionScreen

      private void openDataPackSelectionScreen()
    • tryApplyNewDataPacks

      private void tryApplyNewDataPacks(PackRepository p_100879_)
    • createDefaultLoadConfig

      private static WorldLoader.InitConfig createDefaultLoadConfig(PackRepository p_232873_, DataPackConfig p_232874_)
    • removeTempDataPackDir

      private void removeTempDataPackDir()
    • copyBetweenDirs

      private static void copyBetweenDirs(Path p_100913_, Path p_100914_, Path p_100915_)
    • createNewWorldDirectory

      private Optional<LevelStorageSource.LevelStorageAccess> createNewWorldDirectory()
    • createTempDataPackDirFromExistingWorld

      @Nullable public static Path createTempDataPackDirFromExistingWorld(Path p_100907_, Minecraft p_100908_)
    • getDataPackSelectionSettings

      @Nullable private com.mojang.datafixers.util.Pair<File,PackRepository> getDataPackSelectionSettings()