@Environment(value=CLIENT) public class PresetsScreen extends Screen
Modifier and Type | Class and Description |
---|---|
(package private) static class |
PresetsScreen.SuperflatPreset |
(package private) class |
PresetsScreen.SuperflatPresetsListWidget |
Modifier and Type | Field and 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 |
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, width
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
Constructor and Description |
---|
PresetsScreen(CustomizeFlatLevelScreen parent) |
Modifier and Type | Method and 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) |
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
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, setInitialFocus
mouseMoved
private static final Logger field_25043
private static final List<PresetsScreen.SuperflatPreset> PRESETS
private final CustomizeFlatLevelScreen parent
private Text shareText
private Text listText
private PresetsScreen.SuperflatPresetsListWidget listWidget
private ButtonWidget selectPresetButton
private TextFieldWidget customPresetField
private FlatChunkGeneratorConfig field_25044
public PresetsScreen(CustomizeFlatLevelScreen parent)
@Nullable private static FlatChunkGeneratorLayer method_29059(String string, int int2)
private static List<FlatChunkGeneratorLayer> method_29058(String string)
public static FlatChunkGeneratorConfig method_29060(Registry<Biome> registry, String string, FlatChunkGeneratorConfig flatChunkGeneratorConfig)
private static String method_29062(Registry<Biome> registry, FlatChunkGeneratorConfig flatChunkGeneratorConfig)
protected void init()
This method is called when this screen is opened
or resized.
public boolean mouseScrolled(double mouseX, double mouseY, double amount)
mouseX
- the X coordinate of the mousemouseY
- the Y coordinate of the mouseamount
- value is > 1
if scrolled down, < 1
if scrolled uptrue
to indicate that the event handling is successful/validMouse.onMouseScroll(long, double, double)
public void resize(MinecraftClient client, int width, int height)
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta)
public void tick()
tick
in interface TickableElement
tick
in class Screen
public void updateSelectButton(boolean hasSelected)
private static void addPreset(Text text, ItemConvertible icon, RegistryKey<Biome> registryKey, List<StructureFeature<?>> structures, boolean bool, boolean bool2, boolean bool3, FlatChunkGeneratorLayer[] flatChunkGeneratorLayer)