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
,TabOrderedElement
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static final record
(package private) class
(package private) class
(package private) class
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult
-
Field Summary
Modifier and TypeFieldDescription(package private) static final Component
private GridLayout
(package private) static final Component
private static final int
static final ResourceLocation
(package private) static final Component
private static final int
static final ResourceLocation
private static final int
private final Screen
private static final org.slf4j.Logger
(package private) static final Component
private static final Component
private boolean
private static final int
private final TabManager
private TabNavigationBar
private static final String
private Path
private PackRepository
private static final int
(package private) final WorldCreationUiState
private static final int
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, LIGHT_DIRT_BACKGROUND, STATS_ICON_LOCATION
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
ModifierConstructorDescriptionprivate
CreateWorldScreen
(Minecraft p_276053_, Screen p_276049_, WorldCreationContext p_276047_, Optional<ResourceKey<WorldPreset>> p_276013_, OptionalLong p_276031_) -
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_270272_, WorldDataConfiguration p_270573_, Consumer<WorldDataConfiguration> p_270552_) 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
(Minecraft p_276017_, Screen p_276029_, LevelSettings p_276055_, WorldCreationContext p_276028_, Path p_276040_) 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 Path
protected void
init()
boolean
keyPressed
(int p_100875_, int p_100876_, int p_100877_) void
onClose()
private void
onCreate()
(package private) void
(package private) void
openExperimentsScreen
(WorldDataConfiguration p_270214_) static void
void
private static void
queueLoadScreen
(Minecraft p_232900_, Component p_232901_) private void
void
void
renderDirtBackground
(PoseStack p_275653_) void
void
tick()
private void
tryApplyNewDataPacks
(PackRepository p_270299_, boolean p_270896_, Consumer<WorldDataConfiguration> p_270760_) Methods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearWidgets, findNarratableWidget, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, hideWidgets, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, narrationEnabled, onFilesDrop, rebuildWidgets, removed, removeWidget, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderComponentTooltip, renderComponentTooltip, renderComponentTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderWithTooltip, resize, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, 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, blit, blitNineSliced, blitNineSliced, blitNineSliced, blitOutlineBlack, blitRepeating, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, fill, fill, fillGradient, fillGradient, fillGradient, hLine, renderOutline, 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
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, magicalSpecialHackyFocus, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocused
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved
Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
GROUP_BOTTOM
private static final int GROUP_BOTTOM- See Also:
-
TAB_COLUMN_WIDTH
private static final int TAB_COLUMN_WIDTH- See Also:
-
FOOTER_HEIGHT
private static final int FOOTER_HEIGHT- See Also:
-
TEXT_INDENT
private static final int TEXT_INDENT- See Also:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
TEMP_WORLD_PREFIX
- See Also:
-
GAME_MODEL_LABEL
-
NAME_LABEL
-
EXPERIMENTS_LABEL
-
ALLOW_CHEATS_INFO
-
PREPARING_WORLD_DATA
-
HORIZONTAL_BUTTON_SPACING
private static final int HORIZONTAL_BUTTON_SPACING- See Also:
-
VERTICAL_BUTTON_SPACING
private static final int VERTICAL_BUTTON_SPACING- See Also:
-
HEADER_SEPERATOR
-
FOOTER_SEPERATOR
-
uiState
-
tabManager
-
recreated
private boolean recreated -
lastScreen
-
tempDataPackDir
-
tempDataPackRepository
-
bottomButtons
-
-
Constructor Details
-
CreateWorldScreen
private CreateWorldScreen(Minecraft p_276053_, @Nullable Screen p_276049_, WorldCreationContext p_276047_, Optional<ResourceKey<WorldPreset>> p_276013_, OptionalLong p_276031_)
-
-
Method Details
-
openFresh
-
createFromExisting
public static CreateWorldScreen createFromExisting(Minecraft p_276017_, @Nullable Screen p_276029_, LevelSettings p_276055_, WorldCreationContext p_276028_, @Nullable Path p_276040_) -
getUiState
-
tick
public void tick() -
init
protected void init() -
repositionElements
public void repositionElements()- Overrides:
repositionElements
in classScreen
-
queueLoadScreen
-
onCreate
private void onCreate() -
createNewWorld
private void createNewWorld(PrimaryLevelData.SpecialWorldProperty p_250577_, LayeredRegistryAccess<RegistryLayer> p_249152_, com.mojang.serialization.Lifecycle p_249994_) -
createLevelSettings
-
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
-
renderDirtBackground
- Overrides:
renderDirtBackground
in classScreen
-
addWidget
-
addRenderableWidget
protected <T extends GuiEventListener & Renderable & NarratableEntry> T addRenderableWidget(T p_170199_) - Overrides:
addRenderableWidget
in classScreen
-
getTempDataPackDir
-
openExperimentsScreen
-
openDataPackSelectionScreen
-
tryApplyNewDataPacks
private void tryApplyNewDataPacks(PackRepository p_270299_, boolean p_270896_, Consumer<WorldDataConfiguration> p_270760_) -
applyNewPackConfig
private void applyNewPackConfig(PackRepository p_270272_, WorldDataConfiguration p_270573_, Consumer<WorldDataConfiguration> p_270552_) -
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(WorldDataConfiguration p_268328_)
-