Class ExactItemSetFilter
java.lang.Object
alexiil.mc.lib.attributes.item.filter.ExactItemSetFilter
- All Implemented Interfaces:
ItemFilter
,ReadableItemFilter
public final class ExactItemSetFilter extends java.lang.Object implements ReadableItemFilter
-
Nested Class Summary
Nested classes/interfaces inherited from interface alexiil.mc.lib.attributes.item.filter.ItemFilter
ItemFilter.ItemFilterAsPredicate
-
Constructor Summary
Constructors Constructor Description ExactItemSetFilter(java.util.Set<net.minecraft.item.Item> items)
-
Method Summary
Modifier and Type Method Description static ReadableItemFilter
anyOf(java.util.Collection<? extends net.minecraft.item.ItemConvertible> items)
static ReadableItemFilter
anyOf(net.minecraft.item.ItemConvertible[] items)
java.util.Set<net.minecraft.item.Item>
getItems()
boolean
matches(net.minecraft.item.ItemStack stack)
Checks to see if this filter matches the given stack.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface alexiil.mc.lib.attributes.item.filter.ItemFilter
and, asPredicate, negate, or
-
Constructor Details
-
ExactItemSetFilter
public ExactItemSetFilter(java.util.Set<net.minecraft.item.Item> items)
-
-
Method Details
-
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
-
getItems
public java.util.Set<net.minecraft.item.Item> getItems() -
anyOf
public static ReadableItemFilter anyOf(java.util.Collection<? extends net.minecraft.item.ItemConvertible> items) -
anyOf
-