Class ItemStackInputType

java.lang.Object
com.pixelmonmod.pixelmon.api.ui.type.ItemStackInputType
All Implemented Interfaces:
InputType<net.minecraft.world.item.ItemStack>

public class ItemStackInputType extends Object implements InputType<net.minecraft.world.item.ItemStack>
This input type represents a single ItemStack input from the user
  • Field Summary

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

    Constructors
    Modifier
    Constructor
    Description
    protected
    ItemStackInputType(net.minecraft.world.item.ItemStack value, net.minecraft.network.chat.Component label)
     
  • 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(net.minecraft.world.item.ItemStack value, net.minecraft.network.chat.Component label)
    Creates a new item stack input type
    void
    setValue(net.minecraft.world.item.ItemStack value)
    Sets the value of the input
    net.minecraft.world.item.ItemStack
    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<ItemStackInputType> CODEC
    • label

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

      protected net.minecraft.world.item.ItemStack value
  • Constructor Details

    • ItemStackInputType

      protected ItemStackInputType(net.minecraft.world.item.ItemStack value, net.minecraft.network.chat.Component label)
  • Method Details

    • of

      public static ItemStackInputType of(net.minecraft.world.item.ItemStack value, net.minecraft.network.chat.Component label)
      Creates a new item stack input type
      Parameters:
      value - The current value
      label - The label to display
      Returns:
      The new item stack 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<net.minecraft.world.item.ItemStack>
      Returns:
      The codec
    • value

      public net.minecraft.world.item.ItemStack value()
      Description copied from interface: InputType
      The current value of the input
      Specified by:
      value in interface InputType<net.minecraft.world.item.ItemStack>
      Returns:
      The current value
    • setValue

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