Constructor and Description |
---|
ShapedRecipe(ItemStack result)
Deprecated.
|
ShapedRecipe(NamespacedKey key,
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.
|
NamespacedKey |
getKey()
Return the namespaced identifier for this object.
|
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.
|
@Deprecated public ShapedRecipe(ItemStack result)
public ShapedRecipe(NamespacedKey key, ItemStack result)
key
- the unique recipe keyresult
- 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()
public ItemStack getResult()
public NamespacedKey getKey()
Keyed
Copyright © 2021. All rights reserved.