Enum Class EmptyItemExtractable

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

public enum EmptyItemExtractable extends Enum<EmptyItemExtractable> implements ItemExtractable, NullVariant
  • Enum Constant Details

    • NULL

      public static final EmptyItemExtractable NULL
      An ItemExtractable that should be treated as equal to null in all circumstances - that is any checks that depend on an object being extractable should be considered FALSE for this instance.
    • SUPPLIER

      public static final EmptyItemExtractable SUPPLIER
      An ItemExtractable that informs callers that it will push items into a nearby ItemInsertable, but doesn't expose any other item based attributes.

      The buildcraft quarry is a good example of this - it doesn't have any inventory slots itself and it pushes items out of it as it mines them from the world, but item pipes should still connect to it so that it can insert into them.

  • Method Details

    • values

      public static EmptyItemExtractable[] 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 EmptyItemExtractable 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
    • attemptExtraction

      public net.minecraft.item.ItemStack attemptExtraction(ItemFilter filter, int maxCount, Simulation simulation)
      Description copied from interface: ItemExtractable
      Attempt to extract *any* ItemStack from this that matches the given ItemFilter.
      Specified by:
      attemptExtraction in interface ItemExtractable
      maxCount - The maximum number of items that can be extracted. Negative numbers throw an exception.
      simulation - If Simulation.SIMULATE then this should return the same result that a call with Simulation.ACTION would do, but without modifying anything else.
      Returns:
      A new, independent ItemStack that was extracted.
    • getPureExtractable

      public ItemExtractable getPureExtractable()
      Specified by:
      getPureExtractable in interface ItemExtractable
      Returns:
      An object that only implements ItemExtractable, and does not expose any of the other modification methods that sibling or subclasses offer (like ItemInsertable or GroupedItemInv.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<EmptyItemExtractable>