public class InjectableWrapper extends java.lang.Object implements IItemTransactor
IItemTransactor.IItemExtractable, IItemTransactor.IItemInsertable| Constructor and Description |
|---|
InjectableWrapper(IInjectable injectable,
net.minecraft.util.EnumFacing facing) |
| 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. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanFullyAccept, canPartiallyAcceptpublic InjectableWrapper(IInjectable injectable, net.minecraft.util.EnumFacing facing)
@Nonnull
public net.minecraft.item.ItemStack insert(@Nonnull
net.minecraft.item.ItemStack stack,
boolean allOrNone,
boolean simulate)
insert in interface IItemTransactorstack - 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)
IItemTransactorIItemTransactor.insert(ItemStack, boolean, boolean) but probably be more efficient at inserting lots of
items.insert in interface IItemTransactorstacks - 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)
IItemTransactorextract in interface IItemTransactorfilter - 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.