Interface ShapedRecipe.Builder
- Enclosing interface:
ShapedRecipe
public static interface ShapedRecipe.Builder
Builds a
ShapedRecipe, vanilla-style: a pattern of characters and what each one
stands for. A space is an empty cell.
Builders are mutable and are not safe to share between threads.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()category(CraftingCategory category) define(char symbol, Ingredient ingredient) mirrored(boolean mirrored)
-
Method Details
-
pattern
-
define
- Parameters:
symbol- a character of the pattern, anything but a spaceingredient- what it stands for- Returns:
- this builder
- Since:
- 0.1.0
-
result
- Parameters:
result- what one craft gives- Returns:
- this builder
- Since:
- 0.1.0
-
group
- Parameters:
group- the recipe book group, empty for none- Returns:
- this builder
- Since:
- 0.1.0
-
category
- Parameters:
category- the recipe book tab- Returns:
- this builder
- Since:
- 0.1.0
-
mirrored
- Parameters:
mirrored- whether the pattern also matches flipped left to right,trueby default- Returns:
- this builder
- Since:
- 0.1.0
-
build
ShapedRecipe build()- Returns:
- the recipe
- Throws:
IllegalArgumentException- if the pattern is malformed, uses an undefined symbol, leaves a definition unused or the result is empty- Since:
- 0.1.0
-