Class ItemMatcher

java.lang.Object
com.gtnewhorizons.horizonqa.api.gt.ItemMatcher

public final class ItemMatcher extends Object
Predicate for Bus.assertContains(net.minecraft.item.ItemStack) and {@link BusGroup# assertContains}. Default matching ignores stack size; use count(int) to require a minimum amount in the matched slot.
  • Method Details

    • of

      public static ItemMatcher of(net.minecraft.item.ItemStack template)
      Same item, damage, and NBT as template; stack size ignored unless count(int) is used.
    • predicate

      public static ItemMatcher predicate(Predicate<net.minecraft.item.ItemStack> test)
    • count

      public ItemMatcher count(int n)
      Returns a new matcher that also requires at least n items in the stack.
    • matches

      public boolean matches(net.minecraft.item.ItemStack stack)
    • toString

      public String toString()
      Overrides:
      toString in class Object