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 classPresetsScreen.SuperflatPreset(package private) classPresetsScreen.SuperflatPresetsListWidget -
Field Summary
Fields Modifier and Type Field Description private TextFieldWidgetcustomPresetFieldprivate static Loggerfield_25043private FlatChunkGeneratorConfigfield_25044private static RegistryKey<Biome>field_27985private TextlistTextprivate PresetsScreen.SuperflatPresetsListWidgetlistWidgetprivate CustomizeFlatLevelScreenparentprivate static List<PresetsScreen.SuperflatPreset>PRESETSprivate ButtonWidgetselectPresetButtonprivate TextshareTextFields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, widthFields 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 voidaddPreset(Text text, ItemConvertible icon, RegistryKey<Biome> registryKey, List<StructureFeature<?>> structures, boolean bool, boolean bool2, boolean bool3, FlatChunkGeneratorLayer[] flatChunkGeneratorLayer)protected voidinit()Called when a screen should be initialized.private static List<FlatChunkGeneratorLayer>method_29058(String string)private static FlatChunkGeneratorLayermethod_29059(String string, int int2)static FlatChunkGeneratorConfigmethod_29060(Registry<Biome> registry, String string, FlatChunkGeneratorConfig flatChunkGeneratorConfig)private static Stringmethod_29062(Registry<Biome> registry, FlatChunkGeneratorConfig flatChunkGeneratorConfig)booleanmouseScrolled(double mouseX, double mouseY, double amount)Callback for when a mouse button scroll event has been captured.voidonClose()voidremoved()voidrender(MatrixStack matrices, int mouseX, int mouseY, float delta)voidresize(MinecraftClient client, int width, int height)voidtick()voidupdateSelectButton(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, renderTooltip, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocusedMethods 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, method_33284, setZOffsetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.Element
mouseMovedMethods inherited from interface net.minecraft.client.gui.ParentElement
changeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseClicked, mouseDragged, mouseReleased, setInitialFocus
-
Field Details
-
field_25043
-
PRESETS
-
field_27985
-
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> 1if scrolled down,< 1if scrolled up- Returns:
trueto 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:
tickin interfaceTickableElement- Overrides:
tickin 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)
-