Class ExactItemStackFilter
java.lang.Object
alexiil.mc.lib.attributes.item.filter.ExactItemStackFilter
- All Implemented Interfaces:
ItemFilter,ReadableItemFilter
public final class ExactItemStackFilter extends java.lang.Object implements ReadableItemFilter
An
ItemFilter that only matches on a single ItemStack, using
ItemStackUtil.areEqualIgnoreAmounts(ItemStack, ItemStack).-
Nested Class Summary
Nested classes/interfaces inherited from interface alexiil.mc.lib.attributes.item.filter.ItemFilter
ItemFilter.ItemFilterAsPredicate -
Field Summary
Fields Modifier and Type Field Description net.minecraft.item.ItemStackstack -
Constructor Summary
Constructors Constructor Description ExactItemStackFilter(net.minecraft.item.ItemStack stack) -
Method Summary
Modifier and Type Method Description booleanmatches(net.minecraft.item.ItemStack other)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, waitMethods inherited from interface alexiil.mc.lib.attributes.item.filter.ItemFilter
and, asPredicate, negate, or
-
Field Details
-
stack
public final net.minecraft.item.ItemStack stack
-
-
Constructor Details
-
ExactItemStackFilter
public ExactItemStackFilter(net.minecraft.item.ItemStack stack)
-
-
Method Details
-
matches
public boolean matches(net.minecraft.item.ItemStack other)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
-