Interface WidgetCreator

All Known Implementing Classes:
ColorOption, CyclingOption, InputOption, IntSliderOption, ScreenOpenButton, SimpleButton, SliderOption, TextOption, TypedInputOption, WideWidgetCreator
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface WidgetCreator
An interface used to create clickable widgets
  • Method Summary

    Modifier and Type
    Method
    Description
    default net.minecraft.client.gui.components.AbstractWidget
    createWidget(int width, int height)
    Creates the widget, with no position information by default.
    net.minecraft.client.gui.components.AbstractWidget
    createWidget(int x, int y, int width, int height)
    Creates the widget.
    Makes a widget wide.
  • Method Details

    • createWidget

      net.minecraft.client.gui.components.AbstractWidget createWidget(int x, int y, int width, int height)
      Creates the widget.
      Parameters:
      x - The x position
      y - The y position
      width - The widget width
      height - The widget height
      Returns:
      The created widget
    • createWidget

      default net.minecraft.client.gui.components.AbstractWidget createWidget(int width, int height)
      Creates the widget, with no position information by default.
      Parameters:
      width - The widget width
      height - The widget height
      Returns:
      The created widget
    • wide

      default WideWidgetCreator wide()
      Makes a widget wide.
      Returns:
      The wide widget