Constructor and Description |
---|
ShapedRecipe(ItemStack result)
Create a shaped recipe to craft the specified ItemStack.
|
Modifier and Type | Method and Description |
---|---|
Map<Character,ItemStack> |
getIngredientMap()
Get a copy of the ingredients map.
|
ItemStack |
getResult()
Get the result.
|
String[] |
getShape()
Get the shape.
|
ShapedRecipe |
setIngredient(char key,
Material ingredient)
Sets the material that a character in the recipe shape refers to.
|
ShapedRecipe |
setIngredient(char key,
MaterialData ingredient)
Sets the material that a character in the recipe shape refers to.
|
ShapedRecipe |
setIngredient(char key,
Material ingredient,
int raw)
Deprecated.
Magic value
|
ShapedRecipe |
shape(String... shape)
Set the shape of this recipe to the specified rows.
|
public ShapedRecipe(ItemStack result)
result
- The item you want the recipe to create.shape(String...)
,
setIngredient(char, Material)
,
setIngredient(char, Material, int)
,
setIngredient(char, MaterialData)
public ShapedRecipe shape(String... shape)
shape
- The rows of the recipe (up to 3 rows).public ShapedRecipe setIngredient(char key, MaterialData ingredient)
key
- The character that represents the ingredient in the shape.ingredient
- The ingredient.public ShapedRecipe setIngredient(char key, Material ingredient)
key
- The character that represents the ingredient in the shape.ingredient
- The ingredient.@Deprecated public ShapedRecipe setIngredient(char key, Material ingredient, int raw)
key
- The character that represents the ingredient in the shape.ingredient
- The ingredient.raw
- The raw material data as an integer.public Map<Character,ItemStack> getIngredientMap()
public String[] getShape()
Copyright © 2017. All rights reserved.