Class SilentButtonWidget.Builder

java.lang.Object
net.uku3lig.ukulib.utils.SilentButtonWidget.Builder
Enclosing class:
SilentButtonWidget

public static class SilentButtonWidget.Builder extends Object
A silent button builder
  • Constructor Details

    • Builder

      public Builder(net.minecraft.text.Text message, net.minecraft.client.gui.widget.ButtonWidget.PressAction onPress)
      Creates a builder for a silent button
      Parameters:
      message - The text of the button
      onPress - The action to be done when the button is pressed
  • Method Details

    • position

      public SilentButtonWidget.Builder position(int x, int y)
      Sets the position
      Parameters:
      x - The x position
      y - The y position
      Returns:
      The modified builder
    • width

      public SilentButtonWidget.Builder width(int width)
      Sets the width
      Parameters:
      width - The width
      Returns:
      The modified builder
    • size

      public SilentButtonWidget.Builder size(int width, int height)
      Sets the size
      Parameters:
      width - The width
      height - The height
      Returns:
      The modified builder
    • dimensions

      public SilentButtonWidget.Builder dimensions(int x, int y, int width, int height)
      Sets the dimensions
      Parameters:
      x - The x position
      y - The y position
      width - The width
      height - The height
      Returns:
      The modified builder
    • tooltip

      public SilentButtonWidget.Builder tooltip(@Nullable @Nullable net.minecraft.client.gui.tooltip.Tooltip tooltip)
      Sets the tooltip
      Parameters:
      tooltip - The tooltip
      Returns:
      The modified builder
    • narrationSupplier

      public SilentButtonWidget.Builder narrationSupplier(net.minecraft.client.gui.widget.ButtonWidget.NarrationSupplier narrationSupplier)
      Sets the narration supplier
      Parameters:
      narrationSupplier - The narration supplier
      Returns:
      The modified builder
    • build

      public SilentButtonWidget build()
      Build the button
      Returns:
      The button