Enum Class ItemStackCollections

java.lang.Object
java.lang.Enum<ItemStackCollections>
alexiil.mc.lib.attributes.item.ItemStackCollections
All Implemented Interfaces:
Serializable, Comparable<ItemStackCollections>, Constable

public enum ItemStackCollections extends Enum<ItemStackCollections>
Utility methods for creating Map's and Set's based on ItemStack's.

Every set or map factory method will produce a set or map using STRATEGY_IGNORE_AMOUNT or COMPARATOR_IGNORE_AMOUNT, rather than their exact versions.

  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Comparator<net.minecraft.item.ItemStack>
    A Comparator that compares ItemStack's by their Registry Identifier, then ItemStack.getNbt(), then amounts.
    static final Comparator<net.minecraft.item.ItemStack>
    A Comparator that compares ItemStack's by their Registry Identifier, then ItemStack.getNbt().
    static final it.unimi.dsi.fastutil.Hash.Strategy<net.minecraft.item.ItemStack>
    A hash Hash.Strategy to use for Map's and Set's of ItemStack's where the ItemStack.getCount() is important.
    static final it.unimi.dsi.fastutil.Hash.Strategy<net.minecraft.item.ItemStack>
    A hash Hash.Strategy to use for Map's and Set's of ItemStack's where the ItemStack.getCount() is ignored.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <V> it.unimi.dsi.fastutil.objects.Object2ObjectAVLTreeMap<net.minecraft.item.ItemStack,V>
     
    static <V> it.unimi.dsi.fastutil.objects.Object2ObjectOpenCustomHashMap<net.minecraft.item.ItemStack,V>
     
    static it.unimi.dsi.fastutil.objects.Object2IntAVLTreeMap<net.minecraft.item.ItemStack>
     
    static it.unimi.dsi.fastutil.objects.Object2IntOpenCustomHashMap<net.minecraft.item.ItemStack>
     
    static it.unimi.dsi.fastutil.objects.Object2IntLinkedOpenCustomHashMap<net.minecraft.item.ItemStack>
     
    static it.unimi.dsi.fastutil.objects.Object2IntMap<net.minecraft.item.ItemStack>
    Creates a Map that can map ItemStack's to ints.
    static it.unimi.dsi.fastutil.objects.Object2IntRBTreeMap<net.minecraft.item.ItemStack>
     
    static it.unimi.dsi.fastutil.objects.Object2IntSortedMap<net.minecraft.item.ItemStack>
    Creates a SortedMap that can map ItemStack's to ints.
    static <V> it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenCustomHashMap<net.minecraft.item.ItemStack,V>
     
    static <V> Map<net.minecraft.item.ItemStack,V>
    map()
    Creates a Map that can map ItemStack's to objects.
    static it.unimi.dsi.fastutil.objects.ObjectOpenCustomHashSet<net.minecraft.item.ItemStack>
     
    static it.unimi.dsi.fastutil.objects.ObjectLinkedOpenCustomHashSet<net.minecraft.item.ItemStack>
     
    static <V> it.unimi.dsi.fastutil.objects.Object2ObjectRBTreeMap<net.minecraft.item.ItemStack,V>
     
    static Set<net.minecraft.item.ItemStack>
    set()
    Creates a set that can store ItemStack's.
    static it.unimi.dsi.fastutil.objects.ObjectAVLTreeSet<net.minecraft.item.ItemStack>
     
    static <V> SortedMap<net.minecraft.item.ItemStack,V>
    Creates a SortedMap that can map ItemStack's to objects.
    static it.unimi.dsi.fastutil.objects.ObjectRBTreeSet<net.minecraft.item.ItemStack>
     
    static it.unimi.dsi.fastutil.objects.ObjectSortedSet<net.minecraft.item.ItemStack>
    Creates a sorted set that can store ItemStack's.
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • STRATEGY_EXACT

      public static final it.unimi.dsi.fastutil.Hash.Strategy<net.minecraft.item.ItemStack> STRATEGY_EXACT
      A hash Hash.Strategy to use for Map's and Set's of ItemStack's where the ItemStack.getCount() is important.
    • STRATEGY_IGNORE_AMOUNT

      public static final it.unimi.dsi.fastutil.Hash.Strategy<net.minecraft.item.ItemStack> STRATEGY_IGNORE_AMOUNT
      A hash Hash.Strategy to use for Map's and Set's of ItemStack's where the ItemStack.getCount() is ignored.
    • COMPARATOR_ID_EXACT

      public static final Comparator<net.minecraft.item.ItemStack> COMPARATOR_ID_EXACT
      A Comparator that compares ItemStack's by their Registry Identifier, then ItemStack.getNbt(), then amounts.
    • COMPARATOR_IGNORE_AMOUNT

      public static final Comparator<net.minecraft.item.ItemStack> COMPARATOR_IGNORE_AMOUNT
      A Comparator that compares ItemStack's by their Registry Identifier, then ItemStack.getNbt().
  • Method Details

    • values

      public static ItemStackCollections[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ItemStackCollections valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • set

      public static Set<net.minecraft.item.ItemStack> set()
      Creates a set that can store ItemStack's.

      The current implementation delegates to openHashSet().

    • sortedSet

      public static it.unimi.dsi.fastutil.objects.ObjectSortedSet<net.minecraft.item.ItemStack> sortedSet()
      Creates a sorted set that can store ItemStack's.

      The current implementation delegates to sortedAvlTreeSet().

    • openHashSet

      public static it.unimi.dsi.fastutil.objects.ObjectOpenCustomHashSet<net.minecraft.item.ItemStack> openHashSet()
    • openLinkedHashSet

      public static it.unimi.dsi.fastutil.objects.ObjectLinkedOpenCustomHashSet<net.minecraft.item.ItemStack> openLinkedHashSet()
    • sortedRbTreeSet

      public static it.unimi.dsi.fastutil.objects.ObjectRBTreeSet<net.minecraft.item.ItemStack> sortedRbTreeSet()
    • sortedAvlTreeSet

      public static it.unimi.dsi.fastutil.objects.ObjectAVLTreeSet<net.minecraft.item.ItemStack> sortedAvlTreeSet()
    • map

      public static <V> Map<net.minecraft.item.ItemStack,V> map()
      Creates a Map that can map ItemStack's to objects.

      The current implementation delegates to hashMap().

    • sortedMap

      public static <V> SortedMap<net.minecraft.item.ItemStack,V> sortedMap()
      Creates a SortedMap that can map ItemStack's to objects.

      The current implementation delegates to avlTreeMap().

    • hashMap

      public static <V> it.unimi.dsi.fastutil.objects.Object2ObjectOpenCustomHashMap<net.minecraft.item.ItemStack,V> hashMap()
    • linkedHashMap

      public static <V> it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenCustomHashMap<net.minecraft.item.ItemStack,V> linkedHashMap()
    • rbTreeMap

      public static <V> it.unimi.dsi.fastutil.objects.Object2ObjectRBTreeMap<net.minecraft.item.ItemStack,V> rbTreeMap()
    • avlTreeMap

      public static <V> it.unimi.dsi.fastutil.objects.Object2ObjectAVLTreeMap<net.minecraft.item.ItemStack,V> avlTreeMap()
    • intMap

      public static it.unimi.dsi.fastutil.objects.Object2IntMap<net.minecraft.item.ItemStack> intMap()
      Creates a Map that can map ItemStack's to ints.

      The current implementation delegates to intHashMap().

    • intSortedMap

      public static it.unimi.dsi.fastutil.objects.Object2IntSortedMap<net.minecraft.item.ItemStack> intSortedMap()
      Creates a SortedMap that can map ItemStack's to ints.

      The current implementation delegates to intAvlTreeMap().

    • intHashMap

      public static it.unimi.dsi.fastutil.objects.Object2IntOpenCustomHashMap<net.minecraft.item.ItemStack> intHashMap()
    • intLinkedHashMap

      public static it.unimi.dsi.fastutil.objects.Object2IntLinkedOpenCustomHashMap<net.minecraft.item.ItemStack> intLinkedHashMap()
    • intRbTreeMap

      public static it.unimi.dsi.fastutil.objects.Object2IntRBTreeMap<net.minecraft.item.ItemStack> intRbTreeMap()
    • intAvlTreeMap

      public static it.unimi.dsi.fastutil.objects.Object2IntAVLTreeMap<net.minecraft.item.ItemStack> intAvlTreeMap()