Module blueprint
The Blueprint is a receipt used by Artisanry.
Functions
| Blueprint:new (group, result, input) | Creates a new instance of Blueprint. |
| Blueprint:count (input) | Gets the count how often this output can be produced from the given input. |
| Blueprint:get_group () | Gets the group of this Blueprint. |
| Blueprint:get_input () | Gets the input for this Blueprint. |
| Blueprint:get_result (input) | Gets the result for this Blueprint. |
| Blueprint:match (input) | Matches this blueprint against the given input. |
Functions
- Blueprint:new (group, result, input)
-
Creates a new instance of Blueprint.
Parameters:
- group The name of the group of the blueprint.
- result The result of the blueprint, an item string like "sand 5" or "glass".
- input The input for the blueprint, a 2D array with 5 rows and columns.
Returns:
-
The new instance of Blueprint.
- Blueprint:count (input)
-
Gets the count how often this output can be produced from the given
input. The input must match.
Parameters:
- input The input, already matched against this Blueprint.
Returns:
-
The count how often this output can be produced.
- Blueprint:get_group ()
-
Gets the group of this Blueprint.
Returns:
-
The name of the group.
- Blueprint:get_input ()
-
Gets the input for this Blueprint.
Returns:
-
The input of this Blueprint, a 2D array..
- Blueprint:get_result (input)
-
Gets the result for this Blueprint.
Parameters:
- input Optional. The input stack, will be used to determine the count of the result.
Returns:
-
The result, an ItemStack.
- Blueprint:match (input)
-
Matches this blueprint against the given input.
Parameters:
- input The input, already reduced and converted to ItemStacks.
Returns:
-
true if this blueprint matches the given input.