Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.inventory.ShapelessRecipe Class Reference

Represents a shapeless recipe, where the arrangement of the ingredients on the crafting grid does not matter. More...

+ Inheritance diagram for org.bukkit.inventory.ShapelessRecipe:
+ Collaboration diagram for org.bukkit.inventory.ShapelessRecipe:

Public Member Functions

 ShapelessRecipe (ItemStack result)
 Create a shapeless recipe to craft the specified ItemStack.
 
ShapelessRecipe addIngredient (MaterialData ingredient)
 Adds the specified ingredient.
 
ShapelessRecipe addIngredient (Material ingredient)
 Adds the specified ingredient.
 
ShapelessRecipe addIngredient (Material ingredient, int rawdata)
 Adds the specified ingredient.
 
ShapelessRecipe addIngredient (int count, MaterialData ingredient)
 Adds multiples of the specified ingredient.
 
ShapelessRecipe addIngredient (int count, Material ingredient)
 Adds multiples of the specified ingredient.
 
ShapelessRecipe addIngredient (int count, Material ingredient, int rawdata)
 Adds multiples of the specified ingredient.
 
ShapelessRecipe removeIngredient (Material ingredient)
 Removes an ingredient from the list.
 
ShapelessRecipe removeIngredient (MaterialData ingredient)
 Removes an ingredient from the list.
 
ShapelessRecipe removeIngredient (int count, Material ingredient)
 Removes multiple instances of an ingredient from the list.
 
ShapelessRecipe removeIngredient (int count, MaterialData ingredient)
 Removes multiple instances of an ingredient from the list.
 
ShapelessRecipe removeIngredient (Material ingredient, int rawdata)
 Removes an ingredient from the list.
 
ShapelessRecipe removeIngredient (int count, Material ingredient, int rawdata)
 Removes multiple instances of an ingredient from the list.
 
ItemStack getResult ()
 Get the result of this recipe.
 
List< ItemStackgetIngredientList ()
 Get the list of ingredients used for this recipe.
 
- Public Member Functions inherited from org.bukkit.inventory.Recipe
ItemStack getResult ()
 Get the result of this recipe.
 

Detailed Description

Represents a shapeless recipe, where the arrangement of the ingredients on the crafting grid does not matter.

Definition at line 16 of file ShapelessRecipe.java.

Constructor & Destructor Documentation

org.bukkit.inventory.ShapelessRecipe.ShapelessRecipe ( ItemStack  result)

Create a shapeless recipe to craft the specified ItemStack.

The constructor merely determines the result and type; to set the actual recipe, you'll need to call the appropriate methods.

Parameters
resultThe item you want the recipe to create.
See Also
ShapelessRecipe::addIngredient(Material)
ShapelessRecipe::addIngredient(MaterialData)
ShapelessRecipe::addIngredient(Material,int)
ShapelessRecipe::addIngredient(int,Material)
ShapelessRecipe::addIngredient(int,MaterialData)
ShapelessRecipe::addIngredient(int,Material,int)

Definition at line 32 of file ShapelessRecipe.java.

Member Function Documentation

ShapelessRecipe org.bukkit.inventory.ShapelessRecipe.addIngredient ( MaterialData  ingredient)

Adds the specified ingredient.

Parameters
ingredientThe ingredient to add.
Returns
The changed recipe, so you can chain calls.

Definition at line 42 of file ShapelessRecipe.java.

Referenced by org.bukkit.inventory.ShapelessRecipe.addIngredient().

ShapelessRecipe org.bukkit.inventory.ShapelessRecipe.addIngredient ( Material  ingredient)

Adds the specified ingredient.

Parameters
ingredientThe ingredient to add.
Returns
The changed recipe, so you can chain calls.

Definition at line 52 of file ShapelessRecipe.java.

References org.bukkit.inventory.ShapelessRecipe.addIngredient().

ShapelessRecipe org.bukkit.inventory.ShapelessRecipe.addIngredient ( Material  ingredient,
int  rawdata 
)

Adds the specified ingredient.

Parameters
ingredientThe ingredient to add.
rawdataThe data value, or -1 to allow any data value.
Returns
The changed recipe, so you can chain calls.

Definition at line 63 of file ShapelessRecipe.java.

References org.bukkit.inventory.ShapelessRecipe.addIngredient().

ShapelessRecipe org.bukkit.inventory.ShapelessRecipe.addIngredient ( int  count,
MaterialData  ingredient 
)

Adds multiples of the specified ingredient.

Parameters
countHow many to add (can't be more than 9!)
ingredientThe ingredient to add.
Returns
The changed recipe, so you can chain calls.

Definition at line 74 of file ShapelessRecipe.java.

References org.bukkit.inventory.ShapelessRecipe.addIngredient(), org.bukkit.material.MaterialData.getData(), and org.bukkit.material.MaterialData.getItemType().

ShapelessRecipe org.bukkit.inventory.ShapelessRecipe.addIngredient ( int  count,
Material  ingredient 
)

Adds multiples of the specified ingredient.

Parameters
countHow many to add (can't be more than 9!)
ingredientThe ingredient to add.
Returns
The changed recipe, so you can chain calls.

Definition at line 85 of file ShapelessRecipe.java.

References org.bukkit.inventory.ShapelessRecipe.addIngredient().

ShapelessRecipe org.bukkit.inventory.ShapelessRecipe.addIngredient ( int  count,
Material  ingredient,
int  rawdata 
)

Adds multiples of the specified ingredient.

Parameters
countHow many to add (can't be more than 9!)
ingredientThe ingredient to add.
rawdataThe data value, or -1 to allow any data value.
Returns
The changed recipe, so you can chain calls.

Definition at line 97 of file ShapelessRecipe.java.

List<ItemStack> org.bukkit.inventory.ShapelessRecipe.getIngredientList ( )

Get the list of ingredients used for this recipe.

Returns
The input list

Definition at line 205 of file ShapelessRecipe.java.

ItemStack org.bukkit.inventory.ShapelessRecipe.getResult ( )

Get the result of this recipe.

Returns
The result stack.

Definition at line 196 of file ShapelessRecipe.java.

References org.bukkit.inventory.ItemStack.clone().

ShapelessRecipe org.bukkit.inventory.ShapelessRecipe.removeIngredient ( Material  ingredient)

Removes an ingredient from the list.

If the ingredient occurs multiple times, only one instance of it is removed. Only removes exact matches, with a data value of 0.

Parameters
ingredientThe ingredient to remove
Returns
The changed recipe.

Definition at line 114 of file ShapelessRecipe.java.

Referenced by org.bukkit.inventory.ShapelessRecipe.removeIngredient().

ShapelessRecipe org.bukkit.inventory.ShapelessRecipe.removeIngredient ( MaterialData  ingredient)

Removes an ingredient from the list.

If the ingredient occurs multiple times, only one instance of it is removed. If the data value is -1, only ingredients with a -1 data value will be removed.

Parameters
ingredientThe ingredient to remove
Returns
The changed recipe.

Definition at line 126 of file ShapelessRecipe.java.

References org.bukkit.material.MaterialData.getData(), org.bukkit.material.MaterialData.getItemType(), and org.bukkit.inventory.ShapelessRecipe.removeIngredient().

ShapelessRecipe org.bukkit.inventory.ShapelessRecipe.removeIngredient ( int  count,
Material  ingredient 
)

Removes multiple instances of an ingredient from the list.

If there are less instances then specified, all will be removed. Only removes exact matches, with a data value of 0.

Parameters
countThe number of copies to remove.
ingredientThe ingredient to remove
Returns
The changed recipe.

Definition at line 139 of file ShapelessRecipe.java.

References org.bukkit.inventory.ShapelessRecipe.removeIngredient().

ShapelessRecipe org.bukkit.inventory.ShapelessRecipe.removeIngredient ( int  count,
MaterialData  ingredient 
)

Removes multiple instances of an ingredient from the list.

If there are less instances then specified, all will be removed. If the data value is -1, only ingredients with a -1 data value will be removed.

Parameters
countThe number of copies to remove.
ingredientThe ingredient to remove.
Returns
The changed recipe.

Definition at line 152 of file ShapelessRecipe.java.

References org.bukkit.material.MaterialData.getData(), org.bukkit.material.MaterialData.getItemType(), and org.bukkit.inventory.ShapelessRecipe.removeIngredient().

ShapelessRecipe org.bukkit.inventory.ShapelessRecipe.removeIngredient ( Material  ingredient,
int  rawdata 
)

Removes an ingredient from the list.

If the ingredient occurs multiple times, only one instance of it is removed. If the data value is -1, only ingredients with a -1 data value will be removed.

Parameters
ingredientThe ingredient to remove
rawdataThe data value;
Returns
The changed recipe.

Definition at line 165 of file ShapelessRecipe.java.

References org.bukkit.inventory.ShapelessRecipe.removeIngredient().

ShapelessRecipe org.bukkit.inventory.ShapelessRecipe.removeIngredient ( int  count,
Material  ingredient,
int  rawdata 
)

Removes multiple instances of an ingredient from the list.

If there are less instances then specified, all will be removed. If the data value is -1, only ingredients with a -1 data value will be removed.

Parameters
countThe number of copies to remove.
ingredientThe ingredient to remove.
rawdataThe data value.
Returns
The changed recipe.

Definition at line 179 of file ShapelessRecipe.java.

References org.bukkit.inventory.ItemStack.getDurability(), and org.bukkit.inventory.ItemStack.getType().


The documentation for this class was generated from the following file: