24,074 ARTICLES
ON THIS WIKI

PIM

PIM
PIM

Name PIM
Source Mod OpenPeripheral
ID Name Unknown
Type Block
Stackable Yes (64)
Solid Yes
Transparent No
Affected by Gravity No
Emits Light No
Flammable No
Required Tool Any tool

The Personal Inventory Manager (PIM) allows you to interface with a players inventory. You can use it with ComputerCraft for example, to automate taking on and off armour pieces, or pull out ores, tidy up your inventory and much more.

Methods[edit]

Return type Method Description
Table getAllStacks() Get a table with all the items of the inventory
Table getStackInSlot(Number slotNumber) Get details of an item in a particular slot
Number getInventorySize() Get the size of this inventory
Void swapStacks(Number from, Number to[, String fromDirection]) Swap two slots in the inventory
Number pullItemIntoSlot(String direction, Number slot[, Number maxAmount[, Number intoSlot]]) Pull an item from a slot in another inventory into a slot in this one. Returns the amount of items moved
Table getAdvancedMethodsData() Get a complete table of information about all available methods
Table listSources() List all method sources
Void condenseItems() Condense and tidy the stacks in an inventory
Table expandStack(Table stack)
String getInventoryName() Get the name of this inventory
String listMethods() List all the methods available
Void destroyStack(Number slotNumber) Destroy a stack
Number pullItem(String direction, Number slot[, Number maxAmount[, Number intoSlot]]) Pull an item from a slot in another inventory into a slot in this one. Returns the amount of items moved
Number pushItem(String direction, Number slot[, Number maxAmount[, Number intoSlot]]) Push an item from the current inventory into slot on the other one. Returns the amount of items moved
Number pushItemIntoSlot(String direction, Number slot[, Number maxAmount[, Number intoSlot]]) Push an item from the current inventory into slot on the other one. Returns the amount of items moved