Crafting
High-level API
Device name:
craftingProvided by the crafting module to robots.
The top part of the robot's inventory, slots
0 to 8, serves as the crafting grid. Crafted items go into the bottom row, starting at the selected slot.Methods
craft():numberTries to craft once from the crafting grid. Fails if the grid matches no recipe or the result does not fit into the bottom row.
- Returns the number of items crafted, or
0 if crafting failed.- Energy cost:
1Mid-level API
Device name:
CRFTNGMethods
1 craftTries to craft once from the crafting grid. Fails if the grid matches no recipe or the result does not fit into the bottom row.
- Returns one byte, the number of items crafted,
0 if crafting failed.- Energy cost:
1