IItemHandler
Importing the class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
import crafttweaker.api.capability.IItemHandler;
Methods
Return Type: IItemStack
IItemHandler.extractItem(slot as int, amount as int, simulate as boolean) as IItemStack
Parameter | Type | Description | Optional | DefaultValue |
---|---|---|---|---|
Parameter slot | Type int | Description No Description Provided | Optional false | DefaultValue |
Parameter amount | Type int | Description No Description Provided | Optional false | DefaultValue |
Parameter simulate | Type boolean | Description No Description Provided | Optional true | DefaultValue false |
Return Type: int
IItemHandler.getSlotLimit(slot as int) as int
Parameter | Type | Description |
---|---|---|
Parameter slot | Type int | Description No Description Provided |
Return Type: int
// IItemHandler.getSlots() as int
myIItemHandler.getSlots();
Return Type: IItemStack
IItemHandler.getStackInSlot(slot as int) as IItemStack
Parameter | Type | Description |
---|---|---|
Parameter slot | Type int | Description No Description Provided |
Return Type: IItemStack
IItemHandler.insertItem(slot as int, stack as IItemStack, simulate as boolean) as IItemStack
Parameter | Type | Description | Optional | DefaultValue |
---|---|---|---|---|
Parameter slot | Type int | Description No Description Provided | Optional false | DefaultValue |
Parameter stack | Type IItemStack | Description No Description Provided | Optional false | DefaultValue |
Parameter simulate | Type boolean | Description No Description Provided | Optional true | DefaultValue false |
Return Type: boolean
IItemHandler.isItemValid(slot as int, stack as IItemStack) as boolean
Parameter | Type | Description |
---|---|---|
Parameter slot | Type int | Description No Description Provided |
Parameter stack | Type IItemStack | Description No Description Provided |
Properties
Name | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
Name slots | Type int | Has Getter true | Has Setter false | Description No Description Provided |