@Environment(value=CLIENT) public class CreateWorldScreen extends Screen
Modifier and Type | Class and Description |
---|---|
(package private) static class |
CreateWorldScreen.Mode |
(package private) static class |
CreateWorldScreen.WorldCreationException |
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, width
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
Modifier | Constructor and Description |
---|---|
private |
CreateWorldScreen(Screen screen,
DataPackSettings dataPackSettings,
MoreOptionsDialog moreOptionsDialog) |
|
CreateWorldScreen(Screen screen,
LevelInfo levelInfo,
GeneratorOptions generatorOptions,
Path path,
DataPackSettings dataPackSettings,
DynamicRegistryManager.Impl impl) |
Modifier and Type | Method and Description |
---|---|
protected <T extends AbstractButtonWidget> |
addButton(T button)
Adds a button to this screen.
|
protected <T extends Element> |
addChild(T child)
Adds a child element to this screen.
|
private void |
createLevel() |
protected void |
init()
Called when a screen should be initialized.
|
boolean |
keyPressed(int keyCode,
int scanCode,
int modifiers)
Callback for when a key down event has been captured.
|
private void |
method_29682(ResourcePackManager resourcePackManager) |
static Path |
method_29685(Path path,
MinecraftClient minecraftClient) |
private static void |
method_29687(Path path,
Path path2,
Path path3) |
protected Path |
method_29693() |
private void |
method_29694() |
private void |
method_29695() |
private boolean |
method_29696() |
private com.mojang.datafixers.util.Pair<File,ResourcePackManager> |
method_30296() |
void |
method_30297() |
private void |
method_30298() |
static CreateWorldScreen |
method_31130(Screen screen) |
void |
onClose() |
void |
removed() |
void |
render(MatrixStack matrices,
int mouseX,
int mouseY,
float delta) |
void |
setMoreOptionsOpen() |
private void |
setMoreOptionsOpen(boolean moreOptionsOpen) |
void |
tick() |
private void |
toggleMoreOptions() |
private void |
tweakDefaultsTo(CreateWorldScreen.Mode mode) |
private void |
updateSaveFolderName() |
private void |
updateSettingsLabels() |
children, filesDragged, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, renderBackground, renderBackground, renderBackgroundTexture, renderOrderedTooltip, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenError
getFocused, isDragging, setDragging, setFocused
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffset
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
changeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
mouseMoved
private static final Logger field_25480
private static final Text field_25898
private static final Text field_26598
private static final Text field_26599
private static final Text field_26600
private static final Text field_26601
private static final Text field_26602
private final Screen parent
private TextFieldWidget levelNameField
private String saveDirectoryName
private CreateWorldScreen.Mode currentMode
@Nullable private CreateWorldScreen.Mode lastMode
private Difficulty field_24289
private Difficulty field_24290
private boolean cheatsEnabled
private boolean tweakedCheats
public boolean hardcore
protected DataPackSettings field_25479
@Nullable private ResourcePackManager field_25792
private boolean moreOptionsOpen
private ButtonWidget createLevelButton
private ButtonWidget gameModeSwitchButton
private ButtonWidget difficultyButton
private ButtonWidget moreOptionsButton
private ButtonWidget gameRulesButton
private ButtonWidget dataPacksButton
private ButtonWidget enableCheatsButton
private Text firstGameModeDescriptionLine
private Text secondGameModeDescriptionLine
private String levelName
private GameRules gameRules
public final MoreOptionsDialog moreOptionsDialog
public CreateWorldScreen(@Nullable Screen screen, LevelInfo levelInfo, GeneratorOptions generatorOptions, @Nullable Path path, DataPackSettings dataPackSettings, DynamicRegistryManager.Impl impl)
private CreateWorldScreen(@Nullable Screen screen, DataPackSettings dataPackSettings, MoreOptionsDialog moreOptionsDialog)
public static CreateWorldScreen method_31130(@Nullable Screen screen)
public void tick()
tick
in interface TickableElement
tick
in class Screen
protected void init()
This method is called when this screen is opened
or resized.
private void updateSettingsLabels()
private void updateSaveFolderName()
private void createLevel()
private void toggleMoreOptions()
private void tweakDefaultsTo(CreateWorldScreen.Mode mode)
public void setMoreOptionsOpen()
private void setMoreOptionsOpen(boolean moreOptionsOpen)
public boolean keyPressed(int keyCode, int scanCode, int modifiers)
GLFW
class.keyPressed
in interface Element
keyPressed
in interface ParentElement
keyPressed
in class Screen
keyCode
- the named key code of the event as described in the GLFW
classscanCode
- the unique/platform-specific scan code of the keyboard inputmodifiers
- a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)true
to indicate that the event handling is successful/validKeyboard.onKey(long, int, int, int, int)
,
GLFW.GLFW_KEY_Q
,
GLFWKeyCallbackI.invoke(long, int, int, int, int)
public void method_30297()
private void method_30298()
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta)
protected <T extends Element> T addChild(T child)
AbstractButtonWidget
, you should use Screen.addButton(AbstractButtonWidget)
instead.
Adding a child element to a screen does not guarantee the widget is rendered or ticked.
addChild
in class Screen
Screen.addButton(AbstractButtonWidget)
protected <T extends AbstractButtonWidget> T addButton(T button)
Screen.addChild(Element)
since buttons are automatically rendered when added to a screen.private void method_29694()
private void method_29682(ResourcePackManager resourcePackManager)
private void method_29695()
private boolean method_29696()
@Nullable public static Path method_29685(Path path, MinecraftClient minecraftClient)
@Nullable private com.mojang.datafixers.util.Pair<File,ResourcePackManager> method_30296()