public interface ShapedRecipeBuilder
Modifier and Type | Method and Description |
---|---|
ShapedRecipeBuilder |
addResult(ItemStack result)
Adds a resultant ItemStack for when this ShapedRecipe is correctly
crafted.
|
ShapedRecipe |
build()
Builds a ShapedRecipe from this builder.
|
ShapedRecipeBuilder |
dimensions(com.flowpowered.math.vector.Vector2i dimensions)
Sets the dimensions of the grid for the ShapedRecipe in one method call.
|
ShapedRecipeBuilder |
height(int height)
Sets the height of the grid for the ShapedRecipe.
|
ShapedRecipeBuilder |
ingredient(int x,
int y,
ItemStack ingredient)
Sets the ingredient required by the recipe in the given coordinates.
|
ShapedRecipeBuilder |
ingredient(com.flowpowered.math.vector.Vector2i pos,
ItemStack ingredient)
Sets the ingredient required by the recipe in the given position.
|
ShapedRecipeBuilder |
row(int row,
ItemStack... ingredients)
Sets the ingredients required by the recipe in the given row.
|
ShapedRecipeBuilder |
width(int width)
Sets the width of the grid for the ShapedRecipe.
|
ShapedRecipeBuilder width(int width)
width
- The width of the gridShapedRecipeBuilder height(int height)
height
- The height of the gridShapedRecipeBuilder dimensions(com.flowpowered.math.vector.Vector2i dimensions)
dimensions
- The dimensions of the gridShapedRecipeBuilder ingredient(int x, int y, @Nullable ItemStack ingredient)
x
- The x coordinatey
- The y coordinateingredient
- The ingredient to set, or remove if nullShapedRecipeBuilder ingredient(com.flowpowered.math.vector.Vector2i pos, @Nullable ItemStack ingredient)
pos
- The positioningredient
- The ingredient to set, or remove if nullShapedRecipeBuilder row(int row, ItemStack... ingredients)
row
- The number of the rowingredients
- A list of ItemStacks to set as ingredients. If one
of them is null the ingredient in that position is
not added.ShapedRecipeBuilder addResult(ItemStack result)
result
- The resultShapedRecipe build()