Computer Controlled Crafter - theoriginalbit/MoarPeripherals GitHub Wiki
![]() |
|---|
| Type: computer_crafter |
| Name: MoarPeripherals:blockComputerCrafter |
The Computer Controlled Crafter is a peripheral block that can be used to quickly craft a given pattern of items over and over. It offers a storage area into which resources can be placed, and a crafting table template where the desired pattern can be defined. Assuming a valid pattern is set, and matching resources are present in storage, it can then proceed to produce items.
It can also be used to gather a substantial amount of data about the items placed in its inventory, ranging from their IDs to the name of the mod they come from, in a similar manner to the functions added to inventories by OpenPeripherals. It does not, however, have the ability to pump items in or out of itself.
This MoarPeripherals version of the Computer Controlled Crafter is similar to that seen in the MiscPeripherals mod (which is only compatible with older builds of ComputerCraft).
##Functions
| Name | Returns | Description |
|---|---|---|
| getInventorySize() | number size | Returns the number of slots available in the storage area of the block. |
| getStackInSlot(number slot) | table itemDetails | Returns details on the item placed in the specified storage slot. Acceptable values are 1 through to getInventorySize(). |
| clearCraftingSlot(number slot) | {boolean result [, string error]} | Unsets the specified crafting slot. Acceptable values are 1 through to 9. |
| clearCraftingGrid() | nil | Unsets all nine crafting slots. |
| getCraftingSlot(number slot) | table itemDetails | Returns details on the item set in the specified crafting slot. |
| setCraftingSlot(number slot, table itemDetails) | boolean result [, string error] | The specified crafting slot will be set to use the item defined by the table passed. Note that the defined item need not exist in the Crafter's storage area, though you may find it convenient to get item description tables using getStackInSlot(). |
| isRecipeValid() | boolean valid | Returns whether the items set in the crafting grid depict a valid crafting pattern. Ignores whether the required items are actually available in the Crafter's storage area. |
| craft() | boolean result [, string error] | Crafts the item specified by the pattern set in the crafting slots, using items available from the storage slots. Resources must be precise - for example, birch wood planks cannot be used to craft sticks if the crafting slots are set to require oak wood planks. Output is placed into the first available storage slot. One craft is performed per call. |
##Recipe

##Version History
| Build | Date | Details |
|---|---|---|
| v1.5.0 | 15 December 2014 | Initial release. |
