public enum NoSpaceTransactor extends java.lang.Enum<NoSpaceTransactor> implements IItemTransactor
IItemTransactor.IItemExtractable, IItemTransactor.IItemInsertable
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
net.minecraft.item.ItemStack |
extract(IStackFilter filter,
int min,
int max,
boolean simulate)
Extracts a number of items that match the given filter
|
net.minecraft.item.ItemStack |
insert(net.minecraft.item.ItemStack stack,
boolean allOrNone,
boolean simulate) |
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> |
insert(net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> stacks,
boolean simulate)
Similar to
IItemTransactor.insert(ItemStack, boolean, boolean) but probably be more efficient at inserting lots of
items. |
static NoSpaceTransactor |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static NoSpaceTransactor[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
canFullyAccept, canPartiallyAccept
public static final NoSpaceTransactor INSTANCE
public static NoSpaceTransactor[] values()
for (NoSpaceTransactor c : NoSpaceTransactor.values()) System.out.println(c);
public static NoSpaceTransactor valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null@Nonnull public net.minecraft.item.ItemStack insert(@Nonnull net.minecraft.item.ItemStack stack, boolean allOrNone, boolean simulate)
insert
in interface IItemTransactor
stack
- The stack to insert. Must not be null!allOrNone
- If true then either the entire stack will be used or none of it.simulate
- If true then the in-world state of this will not be changed.ItemStack.EMPTY
if all of it was accepted.public net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> insert(net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> stacks, boolean simulate)
IItemTransactor
IItemTransactor.insert(ItemStack, boolean, boolean)
but probably be more efficient at inserting lots of
items.insert
in interface IItemTransactor
stacks
- The stacks to insert. Must not be null!simulate
- If true then the in-world state of this will not be changed.@Nonnull public net.minecraft.item.ItemStack extract(IStackFilter filter, int min, int max, boolean simulate)
IItemTransactor
extract
in interface IItemTransactor
filter
- The filter that MUST be met by the extracted stack. Null means no filter - it can be any item.min
- The minimum number of items to extract, or 0 if not enough items can be extractedmax
- The maximum number of items to extract.simulate
- If true then the in-world state of this will not be changed.ItemStack.EMPTY
if it could not be.