Class ExactItemSetFilter

java.lang.Object
alexiil.mc.lib.attributes.item.filter.ExactItemSetFilter
All Implemented Interfaces:
ItemFilter, ReadableItemFilter

public final class ExactItemSetFilter extends Object implements ReadableItemFilter
A ReadableItemFilter, similar to ExactItemFilter but which matches any of the Items in a Set.
  • Constructor Details

    • ExactItemSetFilter

      public ExactItemSetFilter(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 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
    • getItems

      public Set<net.minecraft.item.Item> getItems()
    • anyOf

      public static ReadableItemFilter anyOf(Collection<? extends net.minecraft.item.ItemConvertible> items)
    • anyOf

      public static ReadableItemFilter anyOf(net.minecraft.item.ItemConvertible[] items)