Class CreateWorldScreen

All Implemented Interfaces:
IGuiEventListener, INestedGuiEventHandler, IRenderable, IScreen

public class CreateWorldScreen extends Screen
  • Field Details

    • LOGGER

      private static final org.apache.logging.log4j.Logger LOGGER
    • GAME_MODEL_LABEL

      private static final ITextComponent GAME_MODEL_LABEL
    • SEED_LABEL

      private static final ITextComponent SEED_LABEL
    • SEED_INFO

      private static final ITextComponent SEED_INFO
    • NAME_LABEL

      private static final ITextComponent NAME_LABEL
    • OUTPUT_DIR_INFO

      private static final ITextComponent OUTPUT_DIR_INFO
    • COMMANDS_INFO

      private static final ITextComponent COMMANDS_INFO
    • lastScreen

      private final Screen lastScreen
    • nameEdit

      private TextFieldWidget nameEdit
    • resultFolder

      private String resultFolder
    • gameMode

      private CreateWorldScreen.GameMode gameMode
    • oldGameMode

      @Nullable private CreateWorldScreen.GameMode oldGameMode
    • selectedDifficulty

      private Difficulty selectedDifficulty
    • effectiveDifficulty

      private Difficulty effectiveDifficulty
    • commands

      private boolean commands
    • commandsChanged

      private boolean commandsChanged
    • hardCore

      public boolean hardCore
    • dataPacks

      protected DatapackCodec dataPacks
    • tempDataPackDir

      @Nullable private Path tempDataPackDir
    • tempDataPackRepository

      @Nullable private ResourcePackList tempDataPackRepository
    • displayOptions

      private boolean displayOptions
    • createButton

      private Button createButton
    • modeButton

      private Button modeButton
    • difficultyButton

      private Button difficultyButton
    • moreOptionsButton

      private Button moreOptionsButton
    • gameRulesButton

      private Button gameRulesButton
    • dataPacksButton

      private Button dataPacksButton
    • commandsButton

      private Button commandsButton
    • gameModeHelp1

      private ITextComponent gameModeHelp1
    • gameModeHelp2

      private ITextComponent gameModeHelp2
    • initName

      private String initName
    • gameRules

      private GameRules gameRules
    • worldGenSettingsComponent

      public final WorldOptionsScreen worldGenSettingsComponent
  • Constructor Details

  • Method Details

    • create

      public static CreateWorldScreen create(@Nullable Screen p_243425_0_)
    • tick

      public void tick()
      Specified by:
      tick in interface IScreen
      Overrides:
      tick in class Screen
    • init

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

      private void updateGameModeHelp()
    • updateResultFolder

      private void updateResultFolder()
    • removed

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

      private void onCreate()
    • toggleDisplayOptions

      private void toggleDisplayOptions()
    • setGameMode

      private void setGameMode(CreateWorldScreen.GameMode p_228200_1_)
    • updateDisplayOptions

      public void updateDisplayOptions()
    • setDisplayOptions

      private void setDisplayOptions(boolean p_146316_1_)
    • keyPressed

      public boolean keyPressed(int p_231046_1_, int p_231046_2_, int p_231046_3_)
      Specified by:
      keyPressed in interface IGuiEventListener
      Specified by:
      keyPressed in interface INestedGuiEventHandler
      Overrides:
      keyPressed in class Screen
    • onClose

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

      public void popScreen()
    • cleanupTempResources

      private void cleanupTempResources()
    • render

      public void render(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_)
      Specified by:
      render in interface IRenderable
      Overrides:
      render in class Screen
    • addWidget

      protected <T extends IGuiEventListener> T addWidget(T p_230481_1_)
      Overrides:
      addWidget in class Screen
    • addButton

      protected <T extends Widget> T addButton(T p_230480_1_)
      Overrides:
      addButton in class Screen
    • getTempDataPackDir

      @Nullable protected Path getTempDataPackDir()
    • openDataPackSelectionScreen

      private void openDataPackSelectionScreen()
    • tryApplyNewDataPacks

      private void tryApplyNewDataPacks(ResourcePackList p_241621_1_)
    • removeTempDataPackDir

      private void removeTempDataPackDir()
    • copyBetweenDirs

      private static void copyBetweenDirs(Path p_238945_0_, Path p_238945_1_, Path p_238945_2_)
    • copyTempDataPackDirToNewWorld

      private boolean copyTempDataPackDirToNewWorld()
    • createTempDataPackDirFromExistingWorld

      @Nullable public static Path createTempDataPackDirFromExistingWorld(Path p_238943_0_, Minecraft p_238943_1_)
    • getDataPackSelectionSettings

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