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 ANYTHINGANYTHING_EXCEPT_EMPTYDeprecated.NOTHINGONLY_EMPTYDeprecated. -
Method Summary
Modifier and Type Method Description ItemFilterand(ItemFilter other)booleanmatches(net.minecraft.item.ItemStack stack)Checks to see if this filter matches the given stack.ItemFilternegate()static ConstantItemFilterof(boolean result)static ConstantItemFilterof(boolean fullResult, boolean emptyResult)Deprecated.ItemFilteror(ItemFilter other)static ConstantItemFiltervalueOf(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:ItemFilterChecks 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:
matchesin interfaceItemFilter
-
negate
- Specified by:
negatein interfaceItemFilter
-
and
- Specified by:
andin interfaceItemFilter
-
or
- Specified by:
orin interfaceItemFilter
-