public class VanillaHopperItemHandler extends InvWrapper
Modifier and Type | Field and Description |
---|---|
private TileEntityHopper |
hopper |
Constructor and Description |
---|
VanillaHopperItemHandler(TileEntityHopper hopper) |
Modifier and Type | Method and Description |
---|---|
ItemStack |
insertItem(int slot,
ItemStack stack,
boolean simulate)
Inserts an ItemStack into the given slot and return the remainder.
|
equals, extractItem, getInv, getSlotLimit, getSlots, getStackInSlot, hashCode, isItemValid, setStackInSlot
private final TileEntityHopper hopper
public VanillaHopperItemHandler(TileEntityHopper hopper)
@Nonnull public ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate)
IItemHandler
Inserts an ItemStack into the given slot and return the remainder. The ItemStack should not be modified in this function!
Note: This behaviour is subtly different fromIFluidHandler.fill(FluidStack, boolean)
insertItem
in interface IItemHandler
insertItem
in class InvWrapper
slot
- Slot to insert into.stack
- ItemStack to insert. This must not be modified by the item handler.simulate
- If true, the insertion is only simulated