Package net.minecraft.client.gui.screen
Class PresetsScreen
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.AbstractParentElement
net.minecraft.client.gui.screen.Screen
net.minecraft.client.gui.screen.PresetsScreen
- All Implemented Interfaces:
Drawable
,Element
,ParentElement
,TickableElement
@Environment(CLIENT) public class PresetsScreen extends Screen
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
PresetsScreen.SuperflatPreset
(package private) class
PresetsScreen.SuperflatPresetsListWidget
-
Field Summary
Fields Modifier and Type Field Description private TextFieldWidget
customPresetField
private static Logger
field_25043
private FlatChunkGeneratorConfig
field_25044
private Text
listText
private PresetsScreen.SuperflatPresetsListWidget
listWidget
private CustomizeFlatLevelScreen
parent
private static List<PresetsScreen.SuperflatPreset>
PRESETS
private ButtonWidget
selectPresetButton
private Text
shareText
Fields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, width
Fields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
-
Constructor Summary
Constructors Constructor Description PresetsScreen(CustomizeFlatLevelScreen parent)
-
Method Summary
Modifier and Type Method Description private static void
addPreset(Text text, ItemConvertible icon, RegistryKey<Biome> registryKey, List<StructureFeature<?>> structures, boolean bool, boolean bool2, boolean bool3, FlatChunkGeneratorLayer[] flatChunkGeneratorLayer)
protected void
init()
Called when a screen should be initialized.private static List<FlatChunkGeneratorLayer>
method_29058(String string)
private static FlatChunkGeneratorLayer
method_29059(String string, int int2)
static FlatChunkGeneratorConfig
method_29060(Registry<Biome> registry, String string, FlatChunkGeneratorConfig flatChunkGeneratorConfig)
private static String
method_29062(Registry<Biome> registry, FlatChunkGeneratorConfig flatChunkGeneratorConfig)
boolean
mouseScrolled(double mouseX, double mouseY, double amount)
Callback for when a mouse button scroll event has been captured.void
onClose()
void
removed()
void
render(MatrixStack matrices, int mouseX, int mouseY, float delta)
void
resize(MinecraftClient client, int width, int height)
void
tick()
void
updateSelectButton(boolean hasSelected)
Methods inherited from class net.minecraft.client.gui.screen.Screen
addButton, addChild, children, filesDragged, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, keyPressed, renderBackground, renderBackground, renderBackgroundTexture, renderOrderedTooltip, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenError
Methods inherited from class net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocused
Methods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffset
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.Element
mouseMoved
Methods inherited from interface net.minecraft.client.gui.ParentElement
changeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseClicked, mouseDragged, mouseReleased, setInitialFocus
-
Field Details
-
field_25043
-
PRESETS
-
parent
-
listText
-
listWidget
-
selectPresetButton
-
customPresetField
-
field_25044
-
-
Constructor Details
-
PresetsScreen
-
-
Method Details
-
method_29059
-
method_29058
-
method_29060
public static FlatChunkGeneratorConfig method_29060(Registry<Biome> registry, String string, FlatChunkGeneratorConfig flatChunkGeneratorConfig) -
method_29062
private static String method_29062(Registry<Biome> registry, FlatChunkGeneratorConfig flatChunkGeneratorConfig) -
init
protected void init()Called when a screen should be initialized.This method is called when this screen is
opened
or resized. -
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double amount)Callback for when a mouse button scroll event has been captured.- Parameters:
mouseX
- the X coordinate of the mousemouseY
- the Y coordinate of the mouseamount
- value is> 1
if scrolled down,< 1
if scrolled up- Returns:
true
to indicate that the event handling is successful/valid- See Also:
Mouse.onMouseScroll(long, double, double)
-
resize
-
onClose
public void onClose() -
removed
public void removed() -
render
-
tick
public void tick()- Specified by:
tick
in interfaceTickableElement
- Overrides:
tick
in classScreen
-
updateSelectButton
public void updateSelectButton(boolean hasSelected) -
addPreset
private static void addPreset(Text text, ItemConvertible icon, RegistryKey<Biome> registryKey, List<StructureFeature<?>> structures, boolean bool, boolean bool2, boolean bool3, FlatChunkGeneratorLayer[] flatChunkGeneratorLayer)
-