Class ItemMatch
java.lang.Object
org.cyclops.commoncapabilities.api.capability.itemhandler.ItemMatch
Item matching flags to be used in
ISlotlessItemHandler
.-
Field Summary
Modifier and TypeFieldDescriptionstatic 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
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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)
-
Field Details
-
ANY
public static final int ANYConvenience value matching any ItemStack.- See Also:
-
ITEM
public static final int ITEMMatch ItemStack items.- See Also:
-
DATA
public static final int DATAMatch ItemStack data components.- See Also:
-
STACKSIZE
public static final int STACKSIZEMatch ItemStack stacksizes.- See Also:
-
EXACT
public static final int EXACTConvenience value matching ItemStacks exactly by item, data component and stacksize.- See Also:
-
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)
-