Class ItemStackHelper
java.lang.Object
net.ixdarklord.coolcatcore.api.utils.ItemStackHelper
Item stack helpers for what 1.20.1's
ItemStack lacks (it has NBT tags, not data components).-
Method Summary
Modifier and TypeMethodDescriptionstatic inthashItemAndTags(@Nullable net.minecraft.world.item.ItemStack stack) A hash of the stack's item and tag, ignoring the count: equal for stacks thatItemStack.isSameItemSameTags(net.minecraft.world.item.ItemStack, net.minecraft.world.item.ItemStack)considers the same.
-
Method Details
-
hashItemAndTags
public static int hashItemAndTags(@Nullable @Nullable net.minecraft.world.item.ItemStack stack) A hash of the stack's item and tag, ignoring the count: equal for stacks thatItemStack.isSameItemSameTags(net.minecraft.world.item.ItemStack, net.minecraft.world.item.ItemStack)considers the same. The 1.20.1 counterpart of newer versions'ItemStack.hashItemAndComponents.
-