Class CustomCookingRecipe<C extends CustomCookingRecipe<C,T>,T extends org.bukkit.inventory.CookingRecipe<?>>
java.lang.Object
me.wolfyscript.customcrafting.recipes.types.CustomRecipe<C,NoneResultTarget>
me.wolfyscript.customcrafting.recipes.types.CustomCookingRecipe<C,T>
- All Implemented Interfaces:
ICustomRecipe<C,NoneResultTarget>
,ICustomVanillaRecipe<T>
,me.wolfyscript.utilities.util.Keyed
- Direct Known Subclasses:
CustomBlastRecipe
,CustomCampfireRecipe
,CustomFurnaceRecipe
,CustomSmokerRecipe
public abstract class CustomCookingRecipe<C extends CustomCookingRecipe<C,T>,T extends org.bukkit.inventory.CookingRecipe<?>>
extends CustomRecipe<C,NoneResultTarget>
implements ICustomVanillaRecipe<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface me.wolfyscript.customcrafting.recipes.types.ICustomRecipe
ICustomRecipe.Serializer
-
Field Summary
Fields inherited from class me.wolfyscript.customcrafting.recipes.types.CustomRecipe
api, conditions, exactMeta, group, hidden, mapper, namespacedKey, priority, result
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
protected
CustomCookingRecipe(CustomCookingRecipe<C,T> customCookingRecipe)
protected
CustomCookingRecipe(me.wolfyscript.utilities.util.NamespacedKey namespacedKey, me.wolfyscript.utilities.libraries.com.fasterxml.jackson.databind.JsonNode node)
-
Method Summary
Modifier and TypeMethodDescriptionabstract C
clone()
int
float
getExp()
getIngredient(int slot)
protected org.bukkit.inventory.RecipeChoice
void
prepareMenu(me.wolfyscript.utilities.api.inventory.gui.GuiHandler<CCCache> guiHandler, me.wolfyscript.utilities.api.inventory.gui.GuiCluster<CCCache> cluster)
void
renderMenu(me.wolfyscript.utilities.api.inventory.gui.GuiWindow<CCCache> guiWindow, me.wolfyscript.utilities.api.inventory.gui.GuiUpdate<CCCache> event)
void
setCookingTime(int cookingTime)
void
setExp(float exp)
void
setIngredient(int slot, Ingredient ingredient)
Used to set Ingredient from cache of the RecipeCreatorvoid
setIngredient(Ingredient ingredient)
abstract boolean
validType(org.bukkit.Material material)
void
writeToJson(me.wolfyscript.utilities.libraries.com.fasterxml.jackson.core.JsonGenerator gen, me.wolfyscript.utilities.libraries.com.fasterxml.jackson.databind.SerializerProvider serializerProvider)
Methods inherited from class me.wolfyscript.customcrafting.recipes.types.CustomRecipe
getAPI, getConditions, getGroup, getNamespacedKey, getPriority, getResult, hasNamespacedKey, isExactMeta, isHidden, setConditions, setExactMeta, setGroup, setHidden, setNamespacedKey, setPriority, setResult, writeToBuf
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface me.wolfyscript.customcrafting.recipes.types.ICustomRecipe
checkCondition, checkConditions, delete, delete, findResultItem, getPacketType, getRecipeBookItems, getRecipeType, isDisabled, save, save
Methods inherited from interface me.wolfyscript.customcrafting.recipes.types.ICustomVanillaRecipe
getVanillaRecipe
-
Constructor Details
-
CustomCookingRecipe
protected CustomCookingRecipe(me.wolfyscript.utilities.util.NamespacedKey namespacedKey, me.wolfyscript.utilities.libraries.com.fasterxml.jackson.databind.JsonNode node) -
CustomCookingRecipe
protected CustomCookingRecipe() -
CustomCookingRecipe
-
-
Method Details
-
clone
- Specified by:
clone
in interfaceICustomRecipe<C extends CustomCookingRecipe<C,T>,T extends org.bukkit.inventory.CookingRecipe<?>>
- Specified by:
clone
in classCustomRecipe<C extends CustomCookingRecipe<C,T>,NoneResultTarget>
-
validType
public abstract boolean validType(org.bukkit.Material material)- Parameters:
material
- The type of the block.- Returns:
- if the recipe can be used inside that type of block!
-
getSource
-
getIngredient
- Specified by:
getIngredient
in interfaceICustomRecipe<C extends CustomCookingRecipe<C,T>,T extends org.bukkit.inventory.CookingRecipe<?>>
-
setIngredient
Description copied from interface:ICustomRecipe
Used to set Ingredient from cache of the RecipeCreator- Specified by:
setIngredient
in interfaceICustomRecipe<C extends CustomCookingRecipe<C,T>,T extends org.bukkit.inventory.CookingRecipe<?>>
- Parameters:
slot
- The slot of the ingredient in the recipe.ingredient
- The ingredient to set
-
setIngredient
-
setCookingTime
public void setCookingTime(int cookingTime) -
getExp
public float getExp() -
getCookingTime
public int getCookingTime() -
setExp
public void setExp(float exp) -
getRecipeChoice
protected org.bukkit.inventory.RecipeChoice getRecipeChoice() -
prepareMenu
public void prepareMenu(me.wolfyscript.utilities.api.inventory.gui.GuiHandler<CCCache> guiHandler, me.wolfyscript.utilities.api.inventory.gui.GuiCluster<CCCache> cluster)- Specified by:
prepareMenu
in interfaceICustomRecipe<C extends CustomCookingRecipe<C,T>,T extends org.bukkit.inventory.CookingRecipe<?>>
-
renderMenu
public void renderMenu(me.wolfyscript.utilities.api.inventory.gui.GuiWindow<CCCache> guiWindow, me.wolfyscript.utilities.api.inventory.gui.GuiUpdate<CCCache> event)- Specified by:
renderMenu
in interfaceICustomRecipe<C extends CustomCookingRecipe<C,T>,T extends org.bukkit.inventory.CookingRecipe<?>>
-
writeToJson
public void writeToJson(me.wolfyscript.utilities.libraries.com.fasterxml.jackson.core.JsonGenerator gen, me.wolfyscript.utilities.libraries.com.fasterxml.jackson.databind.SerializerProvider serializerProvider) throws IOException- Specified by:
writeToJson
in interfaceICustomRecipe<C extends CustomCookingRecipe<C,T>,T extends org.bukkit.inventory.CookingRecipe<?>>
- Overrides:
writeToJson
in classCustomRecipe<C extends CustomCookingRecipe<C,T>,NoneResultTarget>
- Throws:
IOException
-