java.lang.Object
org.cyclops.commoncapabilities.api.capability.itemhandler.ItemMatch

public final class ItemMatch extends Object
Item matching flags to be used in ISlotlessItemHandler.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Convenience value matching any ItemStack.
    static final int
    Match ItemStack data components.
    static Comparator<net.minecraft.core.component.DataComponentMap>
    A comparator for data components.
    static final int
    Convenience value matching ItemStacks exactly by item, data component and stacksize.
    static final int
    Match ItemStack items.
    static final int
    Match ItemStack stacksizes.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    areItemStackDataComponentsEqual(net.minecraft.world.item.ItemStack a, net.minecraft.world.item.ItemStack b)
     
    static boolean
    areItemStacksEqual(net.minecraft.world.item.ItemStack a, net.minecraft.world.item.ItemStack b, int matchFlags)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ANY

      public static final int ANY
      Convenience value matching any ItemStack.
      See Also:
    • ITEM

      public static final int ITEM
      Match ItemStack items.
      See Also:
    • DATA

      public static final int DATA
      Match ItemStack data components.
      See Also:
    • STACKSIZE

      public static final int STACKSIZE
      Match ItemStack stacksizes.
      See Also:
    • EXACT

      public static final int EXACT
      Convenience value matching ItemStacks exactly by item, data component and stacksize.
      See Also:
    • DATA_COMPARATOR

      public static Comparator<net.minecraft.core.component.DataComponentMap> DATA_COMPARATOR
      A comparator for data components. (This is set in GeneralConfig)
  • Constructor Details

    • ItemMatch

      public ItemMatch()
  • Method Details

    • areItemStacksEqual

      public static boolean areItemStacksEqual(net.minecraft.world.item.ItemStack a, net.minecraft.world.item.ItemStack b, int matchFlags)
    • areItemStackDataComponentsEqual

      public static boolean areItemStackDataComponentsEqual(net.minecraft.world.item.ItemStack a, net.minecraft.world.item.ItemStack b)