Enum EmptyItemExtractable

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

public enum EmptyItemExtractable
extends java.lang.Enum<EmptyItemExtractable>
implements ItemExtractable, NullVariant
  • Nested Class Summary

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

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants 
    Enum Constant Description
    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
    An ItemExtractable that informs callers that it will push items into a nearby ItemInsertable, but doesn't expose any other item based attributes.
  • Method Summary

    Modifier and Type Method Description
    net.minecraft.item.ItemStack attemptExtraction​(ItemFilter filter, int maxCount, Simulation simulation)
    Attempt to extract *any* ItemStack from this that matches the given ItemFilter.
    ItemExtractable getPureExtractable()  
    java.lang.String toString()  
    static EmptyItemExtractable valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static EmptyItemExtractable[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface alexiil.mc.lib.attributes.item.ItemExtractable

    attemptAnyExtraction, couldExtractAnything, extract, extract, extract, filtered
  • 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 type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static EmptyItemExtractable valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.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 java.lang.String toString()
      Overrides:
      toString in class java.lang.Enum<EmptyItemExtractable>