Enum ConstantItemFilter

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

public enum ConstantItemFilter
extends java.lang.Enum<ConstantItemFilter>
implements ReadableItemFilter
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>

    Nested classes/interfaces inherited from interface alexiil.mc.lib.attributes.item.filter.ItemFilter

    ItemFilter.ItemFilterAsPredicate
  • Enum Constant Summary

    Enum Constants 
    Enum Constant Description
    ANYTHING  
    ANYTHING_EXCEPT_EMPTY
    Deprecated.
    NOTHING  
    ONLY_EMPTY
    Deprecated.
  • Method Summary

    Modifier and Type Method Description
    ItemFilter and​(ItemFilter other)  
    boolean matches​(net.minecraft.item.ItemStack stack)
    Checks to see if this filter matches the given stack.
    ItemFilter negate()  
    static ConstantItemFilter of​(boolean result)  
    static ConstantItemFilter of​(boolean fullResult, boolean emptyResult)
    Deprecated.
    ItemFilter or​(ItemFilter other)  
    static ConstantItemFilter valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static ConstantItemFilter[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface alexiil.mc.lib.attributes.item.filter.ItemFilter

    asPredicate
  • Enum Constant Details

  • Method Details

    • values

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

      public static ConstantItemFilter valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null
    • of

      public static ConstantItemFilter of​(boolean result)
    • of

      @Deprecated public static ConstantItemFilter of​(boolean fullResult, boolean emptyResult)
      Deprecated.
    • 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