Enum Class ConstantItemFilter

java.lang.Object
java.lang.Enum<ConstantItemFilter>
alexiil.mc.lib.attributes.item.filter.ConstantItemFilter
All Implemented Interfaces:
ItemFilter, ReadableItemFilter, Serializable, Comparable<ConstantItemFilter>, Constable

public enum ConstantItemFilter extends Enum<ConstantItemFilter> implements ReadableItemFilter
  • Enum Constant Details

  • Method Details

    • values

      public static ConstantItemFilter[] 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 ConstantItemFilter 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
    • of

      public static ConstantItemFilter of(boolean result)
    • of

      @Deprecated(since="0.8.0", forRemoval=true) public static ConstantItemFilter of(boolean fullResult, boolean emptyResult)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • matches

      public boolean matches(net.minecraft.item.ItemStack stack)
      Description copied from interface: ItemFilter
      Checks to see if this filter matches the given stack. Note that this must not care about ItemStack.getCount(), except in the case where the stack is ItemStack.isEmpty(), which isn't expected to return a useful result.
      Specified by:
      matches in interface ItemFilter
    • negate

      public ItemFilter negate()
      Specified by:
      negate in interface ItemFilter
    • and

      public ItemFilter and(ItemFilter other)
      Specified by:
      and in interface ItemFilter
    • or

      public ItemFilter or(ItemFilter other)
      Specified by:
      or in interface ItemFilter