Enum Class EmptyItemExtractable
- All Implemented Interfaces:
ItemExtractable
,NullVariant
,Serializable
,Comparable<EmptyItemExtractable>
,Constable
public enum EmptyItemExtractable
extends Enum<EmptyItemExtractable>
implements ItemExtractable, NullVariant
An
ItemExtractable
that never returns any items from
attemptExtraction(ItemFilter, int, Simulation)
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAnItemExtractable
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.AnItemExtractable
that informs callers that it will push items into a nearbyItemInsertable
, but doesn't expose any other item based attributes. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.item.ItemStack
attemptExtraction
(ItemFilter filter, int maxCount, Simulation simulation) toString()
static EmptyItemExtractable
Returns the enum constant of this class with the specified name.static EmptyItemExtractable[]
values()
Returns an array containing the constants of this enum class, 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 interface alexiil.mc.lib.attributes.item.ItemExtractable
attemptAnyExtraction, couldExtractAnything, extract, extract, extract, filtered
-
Enum Constant Details
-
NULL
AnItemExtractable
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
AnItemExtractable
that informs callers that it will push items into a nearbyItemInsertable
, 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
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
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 nameNullPointerException
- if the argument is null
-
attemptExtraction
public net.minecraft.item.ItemStack attemptExtraction(ItemFilter filter, int maxCount, Simulation simulation) Description copied from interface:ItemExtractable
- Specified by:
attemptExtraction
in interfaceItemExtractable
maxCount
- The maximum number of items that can be extracted. Negative numbers throw an exception.simulation
- IfSimulation.SIMULATE
then this should return the same result that a call withSimulation.ACTION
would do, but without modifying anything else.- Returns:
- A new, independent
ItemStack
that was extracted.
-
getPureExtractable
- Specified by:
getPureExtractable
in interfaceItemExtractable
- Returns:
- An object that only implements
ItemExtractable
, and does not expose any of the other modification methods that sibling or subclasses offer (likeItemInsertable
orGroupedItemInv
.
-
toString
- Overrides:
toString
in classEnum<EmptyItemExtractable>
-