public interface IItemHandler
Modifier and Type | Method and Description |
---|---|
ItemStack |
extractItem(int slot,
int amount,
boolean simulate)
Extracts an ItemStack from the given slot.
|
int |
getSlotLimit(int slot)
Retrieves the maximum stack size allowed to exist in the given slot.
|
int |
getSlots()
Returns the number of slots available
|
ItemStack |
getStackInSlot(int slot)
Returns the ItemStack in a given slot.
|
ItemStack |
insertItem(int slot,
ItemStack stack,
boolean simulate)
Inserts an ItemStack into the given slot and return the remainder.
|
int getSlots()
@Nonnull ItemStack getStackInSlot(int slot)
slot
- Slot to query@Nonnull ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate)
slot
- Slot to insert into.stack
- ItemStack to insert.simulate
- If true, the insertion is only simulated@Nonnull ItemStack extractItem(int slot, int amount, boolean simulate)
slot
- Slot to extract from.amount
- Amount to extract (may be greater than the current stacks max limit)simulate
- If true, the extraction is only simulatedint getSlotLimit(int slot)
slot
- Slot to query.