Class RecipeData<R extends ICustomRecipe<?,​?>>

java.lang.Object
me.wolfyscript.customcrafting.recipes.data.RecipeData<R>
Type Parameters:
R - The type of the Recipe which this data stores.
Direct Known Subclasses:
CookingRecipeData, CraftingData, SmithingData

public abstract class RecipeData<R extends ICustomRecipe<?,​?>> extends Object
This object contains data of pre-crafted recipes like the recipe, ingredients and their slot (IngredientData), and the Result.

It indexes at which place of the inventory which CustomItem is used, so it can use the CustomItem consume options, and other options a user might have saved in the item.
The indexed Ingredients are used to target specific items, which are then used inside the MergeOptions.


Depending on the type of the recipe they might be:
  • Field Details

  • Constructor Details

  • Method Details

    • getRecipe

      public R getRecipe()
    • getResult

      public Result<?> getResult()
    • setResult

      public void setResult(Result<?> result)
    • getBySlot

      @Nullable public @Nullable IngredientData getBySlot(int slot)
      The slots indicate the index (position) of the Ingredient inside the recipe. For normal recipes that means from 0 - 9. For Elite recipes the range is from 0 - 36.

      For the correct position open the in-game Recipe Creator GUI and see in which slot the ingredient is. You may take the character saved in the config and use the index of it inside this String "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"

      Parameters:
      slot - The recipe slot to get the IngredientData for.
      Returns:
      The IngredientData of the specified recipe slot.
    • getBySlots

      public List<IngredientData> getBySlots(int[] slots)
      The slots indicate the index (position) of the Ingredient inside the recipe. For normal recipes that means from 0 - 9. For Elite recipes the range is from 0 - 36.

      For the correct position open the in-game Recipe Creator GUI and see in which slot the ingredient is. You may take the character saved in the config and use the index of it inside this String "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"

      Parameters:
      slots - The recipe slots to get the IngredientData for.
      Returns:
      A list of IngredientData of the specified recipe slots.