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.
-
Enum Constant Details
-
ANYTHING
-
ANYTHING_EXCEPT_EMPTY
Deprecated. -
ONLY_EMPTY
Deprecated. -
NOTHING
-
-
Method Details
-
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
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 namejava.lang.NullPointerException
- if the argument is null
-
of
-
of
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 aboutItemStack.getCount()
, except in the case where the stack isItemStack.isEmpty()
, which isn't expected to return a useful result.- Specified by:
matches
in interfaceItemFilter
-
negate
- Specified by:
negate
in interfaceItemFilter
-
and
- Specified by:
and
in interfaceItemFilter
-
or
- Specified by:
or
in interfaceItemFilter
-