Package net.minecraft.client.gui.screen
Class CreateWorldScreen
- java.lang.Object
-
- net.minecraft.client.gui.AbstractGui
-
- net.minecraft.client.gui.FocusableGui
-
- net.minecraft.client.gui.screen.Screen
-
- net.minecraft.client.gui.screen.CreateWorldScreen
-
- All Implemented Interfaces:
IGuiEventListener
,INestedGuiEventHandler
,IRenderable
,IScreen
public class CreateWorldScreen extends Screen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
CreateWorldScreen.DatapackException
(package private) static class
CreateWorldScreen.GameMode
-
Field Summary
-
Fields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, font, height, itemRenderer, minecraft, passEvents, title, width
-
Fields inherited from class net.minecraft.client.gui.AbstractGui
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
-
-
Constructor Summary
Constructors Modifier Constructor Description private
CreateWorldScreen(Screen p_i242063_1_, DatapackCodec p_i242063_2_, WorldOptionsScreen p_i242063_3_)
CreateWorldScreen(Screen p_i242064_1_, WorldSettings p_i242064_2_, DimensionGeneratorSettings p_i242064_3_, java.nio.file.Path p_i242064_4_, DatapackCodec p_i242064_5_, DynamicRegistries.Impl p_i242064_6_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T extends Widget>
TaddButton(T p_230480_1_)
protected <T extends IGuiEventListener>
TaddWidget(T p_230481_1_)
private void
cleanupTempResources()
private static void
copyBetweenDirs(java.nio.file.Path p_238945_0_, java.nio.file.Path p_238945_1_, java.nio.file.Path p_238945_2_)
private boolean
copyTempDataPackDirToNewWorld()
static CreateWorldScreen
create(Screen p_243425_0_)
static java.nio.file.Path
createTempDataPackDirFromExistingWorld(java.nio.file.Path p_238943_0_, Minecraft p_238943_1_)
private com.mojang.datafixers.util.Pair<java.io.File,ResourcePackList>
getDataPackSelectionSettings()
protected java.nio.file.Path
getTempDataPackDir()
protected void
init()
boolean
keyPressed(int p_231046_1_, int p_231046_2_, int p_231046_3_)
void
onClose()
private void
onCreate()
private void
openDataPackSelectionScreen()
void
popScreen()
void
removed()
private void
removeTempDataPackDir()
void
render(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_)
private void
setDisplayOptions(boolean p_146316_1_)
private void
setGameMode(CreateWorldScreen.GameMode p_228200_1_)
void
tick()
private void
toggleDisplayOptions()
private void
tryApplyNewDataPacks(ResourcePackList p_241621_1_)
void
updateDisplayOptions()
private void
updateGameModeHelp()
private void
updateResultFolder()
-
Methods inherited from class net.minecraft.client.gui.screen.Screen
children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, onFilesDrop, renderBackground, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderToolTip, renderWrappedToolTip, resize, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenError
-
Methods inherited from class net.minecraft.client.gui.FocusableGui
getFocused, isDragging, setDragging, setFocused
-
Methods inherited from class net.minecraft.client.gui.AbstractGui
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraft.client.gui.IGuiEventListener
mouseMoved
-
Methods inherited from interface net.minecraft.client.gui.INestedGuiEventHandler
changeFocus, charTyped, getChildAt, keyReleased, magicalSpecialHackyFocus, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
-
-
-
Field Detail
-
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 java.lang.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 java.nio.file.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 java.lang.String initName
-
gameRules
private GameRules gameRules
-
worldGenSettingsComponent
public final WorldOptionsScreen worldGenSettingsComponent
-
-
Constructor Detail
-
CreateWorldScreen
public CreateWorldScreen(@Nullable Screen p_i242064_1_, WorldSettings p_i242064_2_, DimensionGeneratorSettings p_i242064_3_, @Nullable java.nio.file.Path p_i242064_4_, DatapackCodec p_i242064_5_, DynamicRegistries.Impl p_i242064_6_)
-
CreateWorldScreen
private CreateWorldScreen(@Nullable Screen p_i242063_1_, DatapackCodec p_i242063_2_, WorldOptionsScreen p_i242063_3_)
-
-
Method Detail
-
create
public static CreateWorldScreen create(@Nullable Screen p_243425_0_)
-
updateGameModeHelp
private void updateGameModeHelp()
-
updateResultFolder
private void updateResultFolder()
-
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 interfaceIGuiEventListener
- Specified by:
keyPressed
in interfaceINestedGuiEventHandler
- Overrides:
keyPressed
in classScreen
-
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 interfaceIRenderable
- Overrides:
render
in classScreen
-
addWidget
protected <T extends IGuiEventListener> T addWidget(T p_230481_1_)
-
addButton
protected <T extends Widget> T addButton(T p_230480_1_)
-
getTempDataPackDir
@Nullable protected java.nio.file.Path getTempDataPackDir()
-
openDataPackSelectionScreen
private void openDataPackSelectionScreen()
-
tryApplyNewDataPacks
private void tryApplyNewDataPacks(ResourcePackList p_241621_1_)
-
removeTempDataPackDir
private void removeTempDataPackDir()
-
copyBetweenDirs
private static void copyBetweenDirs(java.nio.file.Path p_238945_0_, java.nio.file.Path p_238945_1_, java.nio.file.Path p_238945_2_)
-
copyTempDataPackDirToNewWorld
private boolean copyTempDataPackDirToNewWorld()
-
createTempDataPackDirFromExistingWorld
@Nullable public static java.nio.file.Path createTempDataPackDirFromExistingWorld(java.nio.file.Path p_238943_0_, Minecraft p_238943_1_)
-
getDataPackSelectionSettings
@Nullable private com.mojang.datafixers.util.Pair<java.io.File,ResourcePackList> getDataPackSelectionSettings()
-
-