🍳 custom_recipes#
Generates the custom recipes of the datapack.
- beet_default(ctx: Context) None[source]#
Main entry point for the custom recipes plugin. This plugin handles the generation of custom recipes for the datapack.
Requires a valid definitions in Mem.definitions in order to function properly.
- Parameters:
ctx – The beet context.
awakened_forge#
- class AwakenedForgeRecipeHandler[source]#
Bases:
objectHandler for awakened forge recipe generation.
This class handles the generation of awakened forge recipes.
- stardust_awakened_forge_recipe(
- recipe: JsonDict,
- item: str,
Generate a awakened forge recipe.
- Parameters:
recipe – The recipe data.
item – The item to generate the recipe for.
- Returns:
The generated recipe command.
- Return type:
str
furnace#
- NBT_FURNACE_RECIPES: dict[str, type[SmeltingRecipe | BlastingRecipe | SmokingRecipe]] = {'blasting': <class 'stewbeet.core.cls.recipes.recipe.BlastingRecipe'>, 'smelting': <class 'stewbeet.core.cls.recipes.recipe.SmeltingRecipe'>, 'smoking': <class 'stewbeet.core.cls.recipes.recipe.SmokingRecipe'>}[source]#
The cooking types furnace_nbt_recipes handles, and the class reading each.
- class FurnaceRecipeHandler[source]#
Bases:
objectHandler for furnace NBT recipe generation.
This class handles the generation of custom furnace recipes with NBT data.
- furnace_nbt_recipe(
- recipe: SmeltingRecipe | BlastingRecipe | SmokingRecipe,
- result_loot: str,
- result_ingr: JsonDict,
Generate a furnace NBT recipe.
- Parameters:
recipe – The recipe data.
result_loot – The loot table for the result.
result_ingr – The result ingredient.
- Returns:
The generated recipe command.
- Return type:
str
- furnace_xp_reward(
- recipe: SmeltingRecipe | BlastingRecipe | SmokingRecipe,
- experience: float,
Generate a furnace XP reward.
- Parameters:
recipe – The recipe data.
experience – The experience to reward.
- Returns:
The generated XP reward command.
- Return type:
str
- write_furnace_recipe(
- item: str,
- recipe: SmeltingRecipe | BlastingRecipe | SmokingRecipe,
Write one cooking recipe of
itemfor furnace_nbt_recipes and its xp reward, noting an ingredient that is vanilla.
pulverizer#
- class PulverizerRecipeHandler[source]#
Bases:
objectHandler for pulverizer recipe generation.
This class handles the generation of pulverizer recipes.
- simplenergy_pulverizer_recipe(
- recipe: PulverizingRecipe,
- item: str,
Generate a pulverizer recipe.
- Parameters:
recipe – The recipe data.
item – The item to generate the recipe for.
- Returns:
The generated recipe command.
- Return type:
str
silent#
smithed#
- class SmithedRecipeHandler[source]#
Bases:
objectHandler for Smithed Crafter recipe generation.
This class handles the generation of custom recipes using Smithed Crafter.
- smithed_shapeless_recipe(
- recipe: CraftingShapelessRecipe,
- result_loot: str,
Generate a Smithed Crafter shapeless recipe.
- Parameters:
recipe – The recipe data.
result_loot – The loot table for the result.
- Returns:
The generated recipe command.
- Return type:
str
- smithed_shaped_recipe(
- recipe: CraftingShapedRecipe,
- result_loot: str,
Generate a Smithed Crafter shaped recipe.
Note: Shaped recipe predicates must NOT include ‘count’ because smithed.crafter’s input storage omits count for individual slots. Shapeless predicates DO include count (the number of unique ingredient occurrences), which is handled separately.
- Parameters:
recipe – The recipe data.
result_loot – The loot table for the result.
- Returns:
The generated recipe command.
- Return type:
str
- static slot_predicate(
- ingredient: Ingr | None,
- slot: int,
What a slot of a shaped recipe must hold, air when no ingredient goes there.
Without a count, since smithed.crafter’s input storage omits it for individual slots.
- static slot_dump(
- predicate: JsonDict,
A slot predicate as SNBT, its slot first and as a byte.
>>> SmithedRecipeHandler.slot_dump({"id": "minecraft:air", "Slot": 2}) '{"Slot":2b, "id": "minecraft:air"}'
- write_recipe(
- item: str,
- recipe: CraftingShapedRecipe | CraftingShapelessRecipe,
Write one crafting recipe of an item for the Smithed Crafter, needed as soon as an ingredient is a custom item.
vanilla#
- VANILLA_RECIPES: tuple[type[RecipeBase], ...] = (<class 'stewbeet.core.cls.recipes.recipe.CraftingShapelessRecipe'>, <class 'stewbeet.core.cls.recipes.recipe.CraftingShapedRecipe'>, <class 'stewbeet.core.cls.recipes.recipe.SmeltingRecipe'>, <class 'stewbeet.core.cls.recipes.recipe.BlastingRecipe'>, <class 'stewbeet.core.cls.recipes.recipe.SmokingRecipe'>, <class 'stewbeet.core.cls.recipes.recipe.CampfireCookingRecipe'>, <class 'stewbeet.core.cls.recipes.recipe.StonecuttingRecipe'>, <class 'stewbeet.core.cls.recipes.recipe.SmithingTransformRecipe'>, <class 'stewbeet.core.cls.recipes.recipe.SmithingTrimRecipe'>)[source]#
The recipe types vanilla has a recipe file for.
- class VanillaRecipeHandler[source]#
Bases:
objectHandler for vanilla recipe generation.
This class handles the generation of vanilla recipes (shapeless, shaped, furnace, …).
- write_recipe_unlocking() None[source]#
A function giving every generated recipe, and an advancement unlocking each one when an ingredient or result is held.
- vanilla_shapeless_recipe(
- recipe: CraftingShapelessRecipe,
- item: str,
Generate a vanilla shapeless recipe.
- Parameters:
recipe – The recipe data.
item – The item to generate the recipe for.
- Returns:
The generated recipe.
- Return type:
JsonDict
- vanilla_shaped_recipe(
- recipe: CraftingShapedRecipe,
- item: str,
Generate a vanilla shaped recipe.
- Parameters:
recipe – The recipe data.
item – The item to generate the recipe for.
- Returns:
The generated recipe.
- Return type:
JsonDict
- vanilla_furnace_recipe(
- recipe: SmeltingRecipe | BlastingRecipe | SmokingRecipe | CampfireCookingRecipe,
- item: str,
Generate a vanilla furnace recipe.
- Parameters:
recipe – The recipe data.
item – The item to generate the recipe for.
- Returns:
The generated recipe.
- Return type:
JsonDict
- vanilla_stonecutting_recipe(
- recipe: StonecuttingRecipe,
- item: str,
Generate a vanilla stonecutting recipe.
- Parameters:
recipe – The recipe data.
item – The item to generate the recipe for.
- Returns:
The generated recipe.
- Return type:
JsonDict
- vanilla_smithing_transform_recipe(
- recipe: SmithingTransformRecipe,
- item: str,
Generate a vanilla smithing transform recipe.
- Parameters:
recipe – The recipe data.
item – The item to generate the recipe for.
- Returns:
The generated recipe.
- Return type:
JsonDict
- vanilla_smithing_trim_recipe(
- recipe: SmithingTrimRecipe,
- item: str,
Generate a vanilla smithing trim recipe.
- Parameters:
recipe – The recipe data.
item – The item to generate the recipe for.
- Returns:
The generated recipe.
- Return type:
JsonDict
- generate_recipes(
- override: list[str] | None = None,
Generate all vanilla recipes.
- Parameters:
override – If set, only generate recipes for this item, with override only. Used to regenerate a specific item.
- vanilla_content(
- recipe: RecipeBase,
- item: str,
The vanilla recipe file of a recipe, None when vanilla has no such type or an ingredient is not a plain item.
- vanilla_recipe(
- recipe: RecipeBase,
- item: str,
The vanilla recipe file of one of
VANILLA_RECIPES.
- has_plain_ingredients(
- recipe: RecipeBase,
Whether every ingredient of a recipe is a plain item, all a vanilla recipe file can name, and a trim has its pattern.