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.IItemInsertable
stacks
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, toString
asValid, extract, insert, insert
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
extractItem, getSlots, getStackInSlot, insertItem
canFullyAccept, canPartiallyAccept
public ItemHandlerFiltered(net.minecraftforge.items.IItemHandler filter, boolean emptyIsAnything)
public int getSlotLimit(int slot)
getSlotLimit
in interface net.minecraftforge.items.IItemHandler
getSlotLimit
in class ItemHandlerSimple
public net.minecraft.item.ItemStack getFilter(int slot)
getFilter
in interface IItemHandlerFiltered
slot
- 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.