Class ItemStackComparators
java.lang.Object
org.spongepowered.api.item.inventory.ItemStackComparators
A utility class for getting all available
Comparator
s for ItemStack
s.-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Supplier
<Comparator<ItemStack>> static final Supplier
<Comparator<ItemStack>> The default comparator forItemStack
s.static final Supplier
<Comparator<ItemStack>> Compares ItemStacks only ignoring their stack-size.static final Supplier
<Comparator<ItemStack>> Compares ItemStacks based on theirValue
s.static final Supplier
<Comparator<ItemStack>> Compares ItemStacks based on theirValue
s ignoringKeys.ITEM_DURABILITY
.static final Supplier
<Comparator<ItemStack>> Compares ItemStacks based onItemStack
size.static final Supplier
<Comparator<ItemStack>> Compares ItemStacks based onItemType
.static final Supplier
<Comparator<ItemStack>> -
Method Summary
-
Field Details
-
TYPE
Compares ItemStacks based onItemType
. This comparator will not return the same results as ItemStack.equals(ItemStack) for ItemStacks with extra attached data, different damage values, or different sizes. -
SIZE
Compares ItemStacks based onItemStack
size. This comparator will not return the same results as ItemStack.equals(ItemStack) for ItemStacks with extra attached data, different types, or different damage values. -
TYPE_SIZE
-
DEFAULT
The default comparator forItemStack
s. -
ITEM_DATA
Compares ItemStacks based on theirValue
s. -
ITEM_DATA_IGNORE_DURABILITY
Compares ItemStacks based on theirValue
s ignoringKeys.ITEM_DURABILITY
. -
IGNORE_SIZE
Compares ItemStacks only ignoring their stack-size.This means for stackable items that they can stack together
-
ALL
-