Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.inventory.FurnaceRecipe Class Reference
Inheritance diagram for org.bukkit.inventory.FurnaceRecipe:
org.bukkit.inventory.Recipe

Public Member Functions

 FurnaceRecipe (ItemStack result, Material source)
 
 FurnaceRecipe (ItemStack result, MaterialData source)
 
 FurnaceRecipe (ItemStack result, Material source, int data)
 
FurnaceRecipe setInput (MaterialData input)
 
FurnaceRecipe setInput (Material input)
 
FurnaceRecipe setInput (Material input, int data)
 
ItemStack getInput ()
 
ItemStack getResult ()
 

Detailed Description

Represents a smelting recipe.

Definition at line 9 of file FurnaceRecipe.java.

Constructor & Destructor Documentation

org.bukkit.inventory.FurnaceRecipe.FurnaceRecipe ( ItemStack  result,
Material  source 
)

Create a furnace recipe to craft the specified ItemStack.

Parameters
resultThe item you want the recipe to create.
sourceThe input material.

Definition at line 19 of file FurnaceRecipe.java.

19  {
20  this(result, source, 0);
21  }
org.bukkit.inventory.FurnaceRecipe.FurnaceRecipe ( ItemStack  result,
MaterialData  source 
)

Create a furnace recipe to craft the specified ItemStack.

Parameters
resultThe item you want the recipe to create.
sourceThe input material.

Definition at line 29 of file FurnaceRecipe.java.

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

29  {
30  this(result, source.getItemType(), source.getData());
31  }
org.bukkit.inventory.FurnaceRecipe.FurnaceRecipe ( ItemStack  result,
Material  source,
int  data 
)

Create a furnace recipe to craft the specified ItemStack.

Parameters
resultThe item you want the recipe to create.
sourceThe input material.
dataThe data value. (Note: This is currently ignored by the CraftBukkit server.)
Deprecated:
Magic value

Definition at line 43 of file FurnaceRecipe.java.

43  {
44  this.output = new ItemStack(result);
45  this.ingredient = new ItemStack(source, 1, (short) data);
46  }

Member Function Documentation

ItemStack org.bukkit.inventory.FurnaceRecipe.getInput ( )

Get the input material.

Returns
The input material.

Definition at line 88 of file FurnaceRecipe.java.

88  {
89  return this.ingredient.clone();
90  }
ItemStack org.bukkit.inventory.FurnaceRecipe.getResult ( )

Get the result of this recipe.

Returns
The resulting stack.

Implements org.bukkit.inventory.Recipe.

Definition at line 97 of file FurnaceRecipe.java.

97  {
98  return output.clone();
99  }
FurnaceRecipe org.bukkit.inventory.FurnaceRecipe.setInput ( MaterialData  input)

Sets the input of this furnace recipe.

Parameters
inputThe input material.
Returns
The changed recipe, so you can chain calls.

Definition at line 54 of file FurnaceRecipe.java.

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

Referenced by org.bukkit.inventory.FurnaceRecipe.setInput().

54  {
55  return setInput(input.getItemType(), input.getData());
56  }
FurnaceRecipe setInput(MaterialData input)
FurnaceRecipe org.bukkit.inventory.FurnaceRecipe.setInput ( Material  input)

Sets the input of this furnace recipe.

Parameters
inputThe input material.
Returns
The changed recipe, so you can chain calls.

Definition at line 64 of file FurnaceRecipe.java.

References org.bukkit.inventory.FurnaceRecipe.setInput().

64  {
65  return setInput(input, 0);
66  }
FurnaceRecipe setInput(MaterialData input)
FurnaceRecipe org.bukkit.inventory.FurnaceRecipe.setInput ( Material  input,
int  data 
)

Sets the input of this furnace recipe.

Parameters
inputThe input material.
dataThe data value. (Note: This is currently ignored by the CraftBukkit server.)
Returns
The changed recipe, so you can chain calls.
Deprecated:
Magic value

Definition at line 78 of file FurnaceRecipe.java.

78  {
79  this.ingredient = new ItemStack(input, 1, (short) data);
80  return this;
81  }

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