Package org.bukkit.inventory
Class FurnaceRecipe
- java.lang.Object
-
- org.bukkit.inventory.FurnaceRecipe
-
-
Constructor Summary
Constructors Constructor Description FurnaceRecipe(ItemStack result, Material source)Deprecated.FurnaceRecipe(ItemStack result, MaterialData source)Deprecated.FurnaceRecipe(ItemStack result, MaterialData source, float experience)Deprecated.FurnaceRecipe(ItemStack result, Material source, int data)Deprecated.FurnaceRecipe(NamespacedKey key, ItemStack result, RecipeChoice input, float experience, int cookingTime)Create a furnace recipe to craft the specified ItemStack.FurnaceRecipe(NamespacedKey key, ItemStack result, Material source, float experience, int cookingTime)Create a furnace recipe to craft the specified ItemStack.FurnaceRecipe(NamespacedKey key, ItemStack result, Material source, int data, float experience, int cookingTime)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intgetCookingTime()Get the cooking time for this recipe in ticks.floatgetExperience()Get the experience given by this recipe.StringgetGroup()Get the group of this recipe.ItemStackgetInput()Get the input material.RecipeChoicegetInputChoice()Get the input choice.NamespacedKeygetKey()Return the namespaced identifier for this object.ItemStackgetResult()Get the result of this recipe.voidsetCookingTime(int cookingTime)Set the cooking time for this recipe in ticks.voidsetExperience(float experience)Sets the experience given by this recipe.voidsetGroup(String group)Set the group of this recipe.FurnaceRecipesetInput(Material input)Sets the input of this furnace recipe.FurnaceRecipesetInput(MaterialData input)Sets the input of this furnace recipe.FurnaceRecipesetInput(Material input, int data)Deprecated.Magic valueFurnaceRecipesetInputChoice(RecipeChoice input)Sets the input of this furnace recipe.
-
-
-
Constructor Detail
-
FurnaceRecipe
@Deprecated public FurnaceRecipe(@NotNull ItemStack result, @NotNull Material source)
Deprecated.
-
FurnaceRecipe
@Deprecated public FurnaceRecipe(@NotNull ItemStack result, @NotNull MaterialData source)
Deprecated.
-
FurnaceRecipe
@Deprecated public FurnaceRecipe(@NotNull ItemStack result, @NotNull MaterialData source, float experience)
Deprecated.
-
FurnaceRecipe
@Deprecated public FurnaceRecipe(@NotNull ItemStack result, @NotNull Material source, int data)
Deprecated.
-
FurnaceRecipe
public FurnaceRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime)Create a furnace recipe to craft the specified ItemStack.- Parameters:
key- The unique recipe keyresult- The item you want the recipe to create.source- The input material.experience- The experience given by this recipecookingTime- The cooking time (in ticks)
-
FurnaceRecipe
@Deprecated public FurnaceRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, int data, float experience, int cookingTime)
Deprecated.
-
FurnaceRecipe
public FurnaceRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)Create a furnace recipe to craft the specified ItemStack.- Parameters:
key- The unique recipe keyresult- The item you want the recipe to create.input- The input choices.experience- The experience given by this recipecookingTime- The cooking time (in ticks)
-
-
Method Detail
-
setInput
@NotNull public FurnaceRecipe setInput(@NotNull MaterialData input)
Sets the input of this furnace recipe.- Parameters:
input- The input material.- Returns:
- The changed recipe, so you can chain calls.
-
setInput
@NotNull public FurnaceRecipe setInput(@NotNull Material input)
Sets the input of this furnace recipe.- Parameters:
input- The input material.- Returns:
- The changed recipe, so you can chain calls.
-
setInput
@Deprecated @NotNull public FurnaceRecipe setInput(@NotNull Material input, int data)
Deprecated.Magic valueSets the input of this furnace recipe.- Parameters:
input- The input material.data- The data value. (Note: This is currently ignored by the CraftBukkit server.)- Returns:
- The changed recipe, so you can chain calls.
-
getInput
@NotNull public ItemStack getInput()
Get the input material.- Returns:
- The input material.
-
setInputChoice
@NotNull public FurnaceRecipe setInputChoice(@NotNull RecipeChoice input)
Sets the input of this furnace recipe.- Parameters:
input- The input choice.- Returns:
- The changed recipe, so you can chain calls.
-
getInputChoice
@NotNull public RecipeChoice getInputChoice()
Get the input choice.- Returns:
- The input choice.
-
getResult
@NotNull public ItemStack getResult()
Get the result of this recipe.
-
setExperience
public void setExperience(float experience)
Sets the experience given by this recipe.- Parameters:
experience- the experience level
-
getExperience
public float getExperience()
Get the experience given by this recipe.- Returns:
- experience level
-
setCookingTime
public void setCookingTime(int cookingTime)
Set the cooking time for this recipe in ticks.- Parameters:
cookingTime- new cooking time
-
getCookingTime
public int getCookingTime()
Get the cooking time for this recipe in ticks.- Returns:
- cooking time
-
getKey
@NotNull public NamespacedKey getKey()
Description copied from interface:KeyedReturn the namespaced identifier for this object.
-
getGroup
@NotNull public String getGroup()
Get the group of this recipe. Recipes with the same group may be grouped together when displayed in the client.- Returns:
- recipe group. An empty string denotes no group. May not be null.
-
setGroup
public void setGroup(@NotNull String group)Set the group of this recipe. Recipes with the same group may be grouped together when displayed in the client.- Parameters:
group- recipe group. An empty string denotes no group. May not be null.
-
-