Class RecipeData<R extends ICustomRecipe<?,?>>
- Type Parameters:
R
- The type of the Recipe which this data stores.
- Direct Known Subclasses:
CookingRecipeData
,CraftingData
,SmithingData
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 MergeOption
s.
Depending on the type of the recipe they might be:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<Integer,IngredientData>
protected R
protected Result<?>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
RecipeData(R recipe, Map<Integer,IngredientData> indexedBySlot)
-
Method Summary
Modifier and TypeMethodDescription@Nullable IngredientData
getBySlot(int slot)
The slots indicate the index (position) of the Ingredient inside the recipe.getBySlots(int[] slots)
The slots indicate the index (position) of the Ingredient inside the recipe.Result<?>
void
-
Field Details
-
recipe
-
indexedBySlot
-
result
-
-
Constructor Details
-
RecipeData
-
-
Method Details
-
getRecipe
-
getResult
-
setResult
-
getBySlot
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 theIngredientData
for.- Returns:
- The
IngredientData
of the specified recipe slot.
-
getBySlots
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 theIngredientData
for.- Returns:
- A list of
IngredientData
of the specified recipe slots.
-