tutorial:dynamic_recipe_generation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
dynamic_recipe_generation [2020/10/11 16:48] – [RecipeManager Mixin] deathunter | tutorial:dynamic_recipe_generation [2022/04/14 09:11] – Mark outdated daomephsta | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
+ | The approach outlined in this tutorial should not be used. It can be replaced with a combination of the [[https:// | ||
+ | ====== Dynamic Recipe Generation ====== | ||
Dynamically added recipes are recipes added through code instead of .json files. This can be used for, for example, changing a recipe if a certain mod is installed alongside your mod, or changing the recipe to use tags from another mod. | Dynamically added recipes are recipes added through code instead of .json files. This can be used for, for example, changing a recipe if a certain mod is installed alongside your mod, or changing the recipe to use tags from another mod. | ||
Line 86: | Line 88: | ||
if (FabricLoader.getInstance().isModLoaded(" | if (FabricLoader.getInstance().isModLoaded(" | ||
COPPER_PICKAXE_RECIPE = createShapedRecipeJson( | COPPER_PICKAXE_RECIPE = createShapedRecipeJson( | ||
- | | + | |
- | | + | '#' |
- | | + | ' |
- | | + | |
- | | + | |
- | add(new Identifier(" | + | |
- | add(new Identifier(" | + | |
- | }}, //The items/tags we are using as input. | + | "###" |
- | | + | " | ", |
- | add(" | + | " | " |
- | add(" | + | |
- | }}, //Whether the input we provided is a tag or an item. | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
new Identifier(" | new Identifier(" | ||
); | ); |
tutorial/dynamic_recipe_generation.txt · Last modified: 2022/11/05 12:04 by jab125