Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dimensions ¶
type Dimensions [2]int
Dimensions make up the size of a shaped recipe.
func DimensionsFrom ¶
func DimensionsFrom(shape []string) (Dimensions, error)
DimensionsFrom returns Dimensions from a shape.
type InputItem ¶
type InputItem struct { item.Stack // Variants is true if the item applies to all of its possible variants. This is so it can be rendered in the recipe book // for alternative types. Variants bool }
InputItem is a recipe item. It is an item stack inherently, but it also has an extra value for if it applies to all types.
type Recipe ¶
type Recipe interface { // Input returns the items required to craft the recipe. Input() []InputItem // Output returns the item that is produced when the recipe is crafted. Output() item.Stack // Block returns the block the recipe is for. Block() string }
Recipe is implemented by all recipe types.
type ShapedRecipe ¶
type ShapedRecipe struct { // Dimensions are the dimensions for the shaped recipe. Dimensions Dimensions // contains filtered or unexported fields }
ShapedRecipe is a recipe that has a specific shape that must be used to craft the output of the recipe.
type ShapelessRecipe ¶
type ShapelessRecipe struct {
// contains filtered or unexported fields
}
ShapelessRecipe is a recipe that has no particular shape.
Click to show internal directories.
Click to hide internal directories.