Interface ICustomRecipe<C extends ICustomRecipe<?,?>,T extends ResultTarget>
- All Superinterfaces:
me.wolfyscript.utilities.util.Keyed
- All Known Implementing Classes:
AdvancedCraftingRecipe
,BrewingRecipe
,CauldronRecipe
,CraftingRecipe
,CustomAnvilRecipe
,CustomBlastRecipe
,CustomCampfireRecipe
,CustomCookingRecipe
,CustomFurnaceRecipe
,CustomRecipe
,CustomSmithingRecipe
,CustomSmokerRecipe
,CustomStonecutterRecipe
,EliteCraftingRecipe
,GrindstoneRecipe
,ShapedCraftRecipe
,ShapedEliteCraftRecipe
,ShapelessCraftRecipe
,ShapelessEliteCraftRecipe
public interface ICustomRecipe<C extends ICustomRecipe<?,?>,T extends ResultTarget>
extends me.wolfyscript.utilities.util.Keyed
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
checkCondition(String id, Conditions.Data data)
Checks a specific condition of this recipe against the specified data.default boolean
checkConditions(Conditions.Data data)
Checks all the conditions of the recipe against specified data.clone()
default boolean
delete()
default boolean
delete(@Nullable org.bukkit.entity.Player player)
default boolean
findResultItem(org.bukkit.inventory.ItemStack result)
me.wolfyscript.utilities.api.WolfyUtilities
getAPI()
getGroup()
getIngredient(int slot)
me.wolfyscript.utilities.util.NamespacedKey
default List<me.wolfyscript.utilities.api.inventory.custom_items.CustomItem>
boolean
default boolean
boolean
boolean
isHidden()
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)
default boolean
save()
default boolean
save(@Nullable org.bukkit.entity.Player player)
This method saves the Recipe into the File or the Database.void
setConditions(Conditions conditions)
void
setExactMeta(boolean exactMeta)
void
void
setHidden(boolean hidden)
void
setIngredient(int slot, Ingredient ingredient)
Used to set Ingredient from cache of the RecipeCreatorvoid
setNamespacedKey(me.wolfyscript.utilities.util.NamespacedKey namespacedKey)
void
setPriority(RecipePriority priority)
void
void
writeToBuf(me.wolfyscript.utilities.api.nms.network.MCByteBuf byteBuf)
void
writeToJson(me.wolfyscript.utilities.libraries.com.fasterxml.jackson.core.JsonGenerator gen, me.wolfyscript.utilities.libraries.com.fasterxml.jackson.databind.SerializerProvider serializerProvider)
-
Method Details
-
getAPI
me.wolfyscript.utilities.api.WolfyUtilities getAPI() -
hasNamespacedKey
boolean hasNamespacedKey() -
getNamespacedKey
me.wolfyscript.utilities.util.NamespacedKey getNamespacedKey()- Specified by:
getNamespacedKey
in interfaceme.wolfyscript.utilities.util.Keyed
-
setNamespacedKey
void setNamespacedKey(me.wolfyscript.utilities.util.NamespacedKey namespacedKey) -
getRecipeType
RecipeType<C> getRecipeType() -
getPacketType
RecipePacketType getPacketType() -
getGroup
String getGroup() -
setGroup
-
getResult
-
setResult
-
setIngredient
Used to set Ingredient from cache of the RecipeCreator- Parameters:
slot
- The slot of the ingredient in the recipe.ingredient
- The ingredient to set
-
getIngredient
-
getPriority
RecipePriority getPriority() -
setPriority
-
isExactMeta
boolean isExactMeta() -
setExactMeta
void setExactMeta(boolean exactMeta) -
getConditions
Conditions getConditions() -
setConditions
-
checkConditions
Checks all the conditions of the recipe against specified data.- Parameters:
data
- The data to check the conditions against.- Returns:
- True if the conditions are met.
-
checkCondition
Checks a specific condition of this recipe against the specified data. If the condition does not exist, it will return true.- Parameters:
id
- The id of the Condition.data
- The data to check the condition against.- Returns:
- True if condition is valid or non existent.
-
isHidden
boolean isHidden() -
setHidden
void setHidden(boolean hidden) -
isDisabled
default boolean isDisabled() -
clone
C clone() -
save
default boolean save(@Nullable @Nullable org.bukkit.entity.Player player)This method saves the Recipe into the File or the Database. It can also send a confirmation message to the player if the player is not null. -
save
default boolean save() -
delete
default boolean delete(@Nullable @Nullable org.bukkit.entity.Player player) -
delete
default boolean delete() -
writeToJson
void writeToJson(me.wolfyscript.utilities.libraries.com.fasterxml.jackson.core.JsonGenerator gen, me.wolfyscript.utilities.libraries.com.fasterxml.jackson.databind.SerializerProvider serializerProvider) throws IOException- Throws:
IOException
-
writeToBuf
void writeToBuf(me.wolfyscript.utilities.api.nms.network.MCByteBuf byteBuf) -
findResultItem
default boolean findResultItem(org.bukkit.inventory.ItemStack result) -
getRecipeBookItems
-
renderMenu
-
prepareMenu
-