T - type of recipeBlastingRecipe, CampfireRecipe, FurnaceRecipe, SmokingRecipepublic abstract class CookingRecipe<T extends CookingRecipe> extends Object implements Recipe, Keyed
| Constructor | Description | 
|---|---|
| CookingRecipe(NamespacedKey key,
             ItemStack result,
             RecipeChoice input,
             float experience,
             int cookingTime) | Create a cooking recipe to craft the specified ItemStack. | 
| CookingRecipe(NamespacedKey key,
             ItemStack result,
             Material source,
             float experience,
             int cookingTime) | Create a cooking recipe to craft the specified ItemStack. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| int | getCookingTime() | Get the cooking time for this recipe in ticks. | 
| float | getExperience() | Get the experience given by this recipe. | 
| String | getGroup() | Get the group of this recipe. | 
| ItemStack | getInput() | Get the input material. | 
| RecipeChoice | getInputChoice() | Get the input choice. | 
| NamespacedKey | getKey() | Return the namespaced identifier for this object. | 
| ItemStack | getResult() | Get the result of this recipe. | 
| void | setCookingTime(int cookingTime) | Set the cooking time for this recipe in ticks. | 
| void | setExperience(float experience) | Sets the experience given by this recipe. | 
| void | setGroup(String group) | Set the group of this recipe. | 
| CookingRecipe | setInput(Material input) | Sets the input of this cooking recipe. | 
| T | setInputChoice(RecipeChoice input) | Sets the input of this cooking recipe. | 
public CookingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime)
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)public CookingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)
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)@NotNull public CookingRecipe setInput(@NotNull Material input)
input - The input material.@NotNull public T setInputChoice(@NotNull RecipeChoice input)
input - The input choice.@NotNull public RecipeChoice getInputChoice()
public void setExperience(float experience)
experience - the experience levelpublic float getExperience()
public void setCookingTime(int cookingTime)
cookingTime - new cooking timepublic int getCookingTime()
@NotNull public NamespacedKey getKey()
Keyed@NotNull public String getGroup()
Copyright © 2020. All rights reserved.