Class NumberInputType

java.lang.Object
com.pixelmonmod.pixelmon.api.ui.type.NumberInputType
All Implemented Interfaces:
InputType<Number>

public class NumberInputType extends Object implements InputType<Number>
This input type represents any type of Number input from the user
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<NumberInputType> CODEC
    • label

      protected net.minecraft.network.chat.Component label
    • value

      protected Number value
  • Constructor Details

    • NumberInputType

      protected NumberInputType(Number value, net.minecraft.network.chat.Component label)
  • Method Details

    • of

      public static NumberInputType of(Number value, net.minecraft.network.chat.Component label)
      Creates a new number input type
      Parameters:
      value - The current value
      label - The label to display
      Returns:
      The new number input type
    • codec

      public com.mojang.serialization.Codec<? extends InputType<?>> codec()
      Description copied from interface: InputType
      The codec used for encoding and decoding the data when transferring between the client and server
      Specified by:
      codec in interface InputType<Number>
      Returns:
      The codec
    • value

      public Number value()
      Description copied from interface: InputType
      The current value of the input
      Specified by:
      value in interface InputType<Number>
      Returns:
      The current value
    • setValue

      public void setValue(Number value)
      Description copied from interface: InputType
      Sets the value of the input
      Specified by:
      setValue in interface InputType<Number>
      Parameters:
      value - The new value
    • getWidget

      public List<net.minecraft.client.gui.layouts.Layout> getWidget(Runnable init, Runnable rearrangeTabs)
      Specified by:
      getWidget in interface InputType<Number>
      Returns: