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 booleancheckCondition(String id, Conditions.Data data)Checks a specific condition of this recipe against the specified data.default booleancheckConditions(Conditions.Data data)Checks all the conditions of the recipe against specified data.clone()default booleandelete()default booleandelete(@Nullable org.bukkit.entity.Player player)default booleanfindResultItem(org.bukkit.inventory.ItemStack result)me.wolfyscript.utilities.api.WolfyUtilitiesgetAPI()getGroup()getIngredient(int slot)me.wolfyscript.utilities.util.NamespacedKeydefault List<me.wolfyscript.utilities.api.inventory.custom_items.CustomItem>booleandefault booleanbooleanbooleanisHidden()voidprepareMenu(me.wolfyscript.utilities.api.inventory.gui.GuiHandler<CCCache> guiHandler, me.wolfyscript.utilities.api.inventory.gui.GuiCluster<CCCache> cluster)voidrenderMenu(me.wolfyscript.utilities.api.inventory.gui.GuiWindow<CCCache> guiWindow, me.wolfyscript.utilities.api.inventory.gui.GuiUpdate<CCCache> event)default booleansave()default booleansave(@Nullable org.bukkit.entity.Player player)This method saves the Recipe into the File or the Database.voidsetConditions(Conditions conditions)voidsetExactMeta(boolean exactMeta)voidvoidsetHidden(boolean hidden)voidsetIngredient(int slot, Ingredient ingredient)Used to set Ingredient from cache of the RecipeCreatorvoidsetNamespacedKey(me.wolfyscript.utilities.util.NamespacedKey namespacedKey)voidsetPriority(RecipePriority priority)voidvoidwriteToBuf(me.wolfyscript.utilities.api.nms.network.MCByteBuf byteBuf)voidwriteToJson(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:
getNamespacedKeyin 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
-