Class CreateWorldScreen
java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.worldselection.CreateWorldScreen
- All Implemented Interfaces:
ContainerEventHandler
,GuiEventListener
,Renderable
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static final record
(package private) static enum
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private static final Component
private CycleButton<Boolean>
private boolean
private Button
protected WorldDataConfiguration
private Button
private Difficulty
private CycleButton<Difficulty>
private static final Component
private Component
private Component
private GameRules
private Button
boolean
private String
private final Screen
private static final org.slf4j.Logger
private Button
private static final Component
private EditBox
private static final Component
private static final Component
(package private) String
private static final Component
private static final Component
private static final String
private Path
private PackRepository
private boolean
Fields inherited from class net.minecraft.client.gui.screens.Screen
font, height, itemRenderer, minecraft, passEvents, renderables, title, width
Fields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
ModifierConstructorDescriptionprivate
CreateWorldScreen
(Screen p_249549_, WorldDataConfiguration p_250099_, WorldGenSettingsComponent p_249670_) -
Method Summary
Modifier and TypeMethodDescriptionprotected <T extends GuiEventListener & Renderable & NarratableEntry>
TaddRenderableWidget
(T p_170199_) protected <T extends GuiEventListener & NarratableEntry>
TaddWidget
(T p_100948_) private void
applyNewPackConfig
(PackRepository p_251497_, WorldDataConfiguration p_249845_) private static void
copyBetweenDirs
(Path p_100913_, Path p_100914_, Path p_100915_) private static WorldLoader.InitConfig
createDefaultLoadConfig
(PackRepository p_251829_, WorldDataConfiguration p_251555_) static CreateWorldScreen
createFromExisting
(Screen p_249522_, LevelSettings p_249091_, WorldCreationContext p_249742_, Path p_252076_) private LevelSettings
createLevelSettings
(boolean p_205448_) private void
createNewWorld
(PrimaryLevelData.SpecialWorldProperty p_250577_, LayeredRegistryAccess<RegistryLayer> p_249152_, com.mojang.serialization.Lifecycle p_249994_) static Path
createTempDataPackDirFromExistingWorld
(Path p_100907_, Minecraft p_100908_) private com.mojang.datafixers.util.Pair<Path,
PackRepository> private Difficulty
private Path
protected void
init()
boolean
keyPressed
(int p_100875_, int p_100876_, int p_100877_) void
onClose()
private void
onCreate()
private void
static void
void
private static void
queueLoadScreen
(Minecraft p_232900_, Component p_232901_) void
private void
void
private void
setGameMode
(CreateWorldScreen.SelectedGameMode p_100901_) private void
setWorldGenSettingsVisible
(boolean p_170197_) void
tick()
private void
private void
tryApplyNewDataPacks
(PackRepository p_100879_) private void
private void
Methods inherited from class net.minecraft.client.gui.screens.Screen
addRenderableOnly, afterKeyboardAction, afterMouseAction, afterMouseMove, children, clearWidgets, findNarratableWidget, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, hideWidgets, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, narrationEnabled, onFilesDrop, rebuildWidgets, removed, removeWidget, renderBackground, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderComponentTooltip, renderComponentTooltip, renderComponentTooltip, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderWithTooltip, resize, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, wrapScreenError
Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocused
Methods inherited from class net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blitOutlineBlack, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, fill, fillGradient, 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.components.events.ContainerEventHandler
changeFocus, charTyped, getChildAt, keyReleased, magicalSpecialHackyFocus, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
TEMP_WORLD_PREFIX
- See Also:
-
GAME_MODEL_LABEL
-
SEED_LABEL
-
SEED_INFO
-
NAME_LABEL
-
OUTPUT_DIR_INFO
-
COMMANDS_INFO
-
PREPARING_WORLD_DATA
-
lastScreen
-
nameEdit
-
resultFolder
String resultFolder -
gameMode
-
oldGameMode
-
difficulty
-
commands
private boolean commands -
commandsChanged
private boolean commandsChanged -
hardCore
public boolean hardCore -
dataConfiguration
-
tempDataPackDir
-
tempDataPackRepository
-
worldGenSettingsVisible
private boolean worldGenSettingsVisible -
createButton
-
modeButton
-
difficultyButton
-
moreOptionsButton
-
gameRulesButton
-
dataPacksButton
-
commandsButton
-
gameModeHelp1
-
gameModeHelp2
-
initName
-
gameRules
-
worldGenSettingsComponent
-
-
Constructor Details
-
CreateWorldScreen
private CreateWorldScreen(@Nullable Screen p_249549_, WorldDataConfiguration p_250099_, WorldGenSettingsComponent p_249670_)
-
-
Method Details
-
openFresh
-
createFromExisting
public static CreateWorldScreen createFromExisting(@Nullable Screen p_249522_, LevelSettings p_249091_, WorldCreationContext p_249742_, @Nullable Path p_252076_) -
tick
public void tick() -
init
protected void init() -
getEffectiveDifficulty
-
updateGameModeHelp
private void updateGameModeHelp() -
updateResultFolder
private void updateResultFolder() -
queueLoadScreen
-
onCreate
private void onCreate() -
createNewWorld
private void createNewWorld(PrimaryLevelData.SpecialWorldProperty p_250577_, LayeredRegistryAccess<RegistryLayer> p_249152_, com.mojang.serialization.Lifecycle p_249994_) -
createLevelSettings
-
toggleWorldGenSettingsVisibility
private void toggleWorldGenSettingsVisibility() -
setGameMode
-
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 interfaceContainerEventHandler
- Specified by:
keyPressed
in interfaceGuiEventListener
- Overrides:
keyPressed
in classScreen
-
onClose
public void onClose() -
popScreen
public void popScreen() -
render
- Specified by:
render
in interfaceRenderable
- Overrides:
render
in classScreen
-
addWidget
-
addRenderableWidget
protected <T extends GuiEventListener & Renderable & NarratableEntry> T addRenderableWidget(T p_170199_) - Overrides:
addRenderableWidget
in classScreen
-
getTempDataPackDir
-
openDataPackSelectionScreen
private void openDataPackSelectionScreen() -
tryApplyNewDataPacks
-
applyNewPackConfig
-
createDefaultLoadConfig
private static WorldLoader.InitConfig createDefaultLoadConfig(PackRepository p_251829_, WorldDataConfiguration p_251555_) -
removeTempDataPackDir
private void removeTempDataPackDir() -
copyBetweenDirs
-
createNewWorldDirectory
-
createTempDataPackDirFromExistingWorld
-
getDataPackSelectionSettings
@Nullable private com.mojang.datafixers.util.Pair<Path,PackRepository> getDataPackSelectionSettings()
-