Class BooleanInputType

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

public class BooleanInputType extends Object implements InputType<Boolean>
This input type represents a single boolean input from the user
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<BooleanInputType>
     
    protected net.minecraft.network.chat.Component
     
    protected net.minecraft.network.chat.Component
     
    protected net.minecraft.network.chat.Component
     
    protected boolean
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    BooleanInputType(boolean value, net.minecraft.network.chat.Component label, net.minecraft.network.chat.Component trueValue, net.minecraft.network.chat.Component falseValue)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.mojang.serialization.Codec<? extends InputType<?>>
    The codec used for encoding and decoding the data when transferring between the client and server
    List<net.minecraft.client.gui.layouts.Layout>
    getWidget(Runnable init, Runnable rearrangeTabs)
     
    of(boolean value, net.minecraft.network.chat.Component label)
     
    of(boolean value, net.minecraft.network.chat.Component label, net.minecraft.network.chat.Component trueValue, net.minecraft.network.chat.Component falseValue)
    Creates a new boolean input type
    void
    Sets the value of the input
    The current value of the input

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.pixelmonmod.pixelmon.api.ui.InputType

    getKey
  • Field Details

    • CODEC

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

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

      protected net.minecraft.network.chat.Component trueValue
    • falseValue

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

      protected boolean value
  • Constructor Details

    • BooleanInputType

      protected BooleanInputType(boolean value, net.minecraft.network.chat.Component label, net.minecraft.network.chat.Component trueValue, net.minecraft.network.chat.Component falseValue)
  • Method Details

    • of

      public static BooleanInputType of(boolean value, net.minecraft.network.chat.Component label)
    • of

      public static BooleanInputType of(boolean value, net.minecraft.network.chat.Component label, net.minecraft.network.chat.Component trueValue, net.minecraft.network.chat.Component falseValue)
      Creates a new boolean input type
      Parameters:
      value - The current value
      label - The label to display
      Returns:
      The new boolean 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<Boolean>
      Returns:
      The codec
    • value

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

      public void setValue(Boolean value)
      Description copied from interface: InputType
      Sets the value of the input
      Specified by:
      setValue in interface InputType<Boolean>
      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<Boolean>
      Returns: