Enum Class ItemById

java.lang.Object
java.lang.Enum<ItemById>
baritone.api.command.datatypes.ItemById
All Implemented Interfaces:
IDatatype, IDatatypeFor<net.minecraft.world.item.Item>, Serializable, Comparable<ItemById>, Constable

public enum ItemById extends Enum<ItemById> implements IDatatypeFor<net.minecraft.world.item.Item>
  • Enum Constant Details

  • Method Details

    • values

      public static ItemById[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ItemById valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • get

      public net.minecraft.world.item.Item get(IDatatypeContext ctx) throws CommandException
      Description copied from interface: IDatatypeFor
      Consumes the desired amount of arguments from the specified IDatatypeContext, and then returns the parsed value. This method will more than likely return a IllegalArgumentException if the expected input does not conform to a parseable value. As far as a CommandException being thrown is concerned, see the note below for specifics.
      Specified by:
      get in interface IDatatypeFor<net.minecraft.world.item.Item>
      Parameters:
      ctx - The context
      Returns:
      The parsed data-type
      Throws:
      CommandException - If there was an issue parsing using another type or arguments could not be polled.
      See Also:
    • tabComplete

      Description copied from interface: IDatatype
      Attempts to complete missing or partial input provided through the IArgConsumer} provided by IDatatypeContext.getConsumer() in order to aide the user in executing commands.

      One benefit over datatypes over IArgParsers is that instead of each command trying to guess what values the datatype will accept, or simply not tab completing at all, datatypes that support tab completion can provide accurate information using the same methods used to parse arguments in the first place.

      Specified by:
      tabComplete in interface IDatatype
      Parameters:
      ctx - The argument consumer to tab complete
      Returns:
      A stream representing the strings that can be tab completed. DO NOT INCLUDE SPACES IN ANY STRINGS.
      Throws:
      CommandException
      See Also: