public class ItemHandlerFiltered extends ItemHandlerSimple implements IItemHandlerFiltered
ItemHandlerSimple that gets it's IItemHandlerFiltered.getFilter(int) from a given
IItemHandler instance. This currently instantiates to having the same slot
count as the filter.IItemTransactor.IItemExtractable, IItemTransactor.IItemInsertablestacks| Constructor and Description |
|---|
ItemHandlerFiltered(net.minecraftforge.items.IItemHandler filter,
boolean emptyIsAnything) |
| Modifier and Type | Method and Description |
|---|---|
net.minecraft.item.ItemStack |
getFilter(int slot) |
int |
getSlotLimit(int slot) |
canSet, deserializeNBT, extract, extractItem, getSlots, getStackInSlot, insert, insertItem, isEmpty, serializeNBT, setCallback, setChecker, setInsertor, setLimitedInsertor, setStackInSlot, toStringasValid, extract, insert, insertclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitextractItem, getSlots, getStackInSlot, insertItemcanFullyAccept, canPartiallyAcceptpublic ItemHandlerFiltered(net.minecraftforge.items.IItemHandler filter,
boolean emptyIsAnything)
public int getSlotLimit(int slot)
getSlotLimit in interface net.minecraftforge.items.IItemHandlergetSlotLimit in class ItemHandlerSimplepublic net.minecraft.item.ItemStack getFilter(int slot)
getFilter in interface IItemHandlerFilteredslot - the slot to testItemStack.EMPTY if this is not filtered to a single item (for
example if this will match against a few stacks, or nothing is allowed, or a wide range of stacks are
allowed). Will be equal to IItemHandler.getStackInSlot(int) if the slot currently contains an item.