Started by
Troheya
on
Topic category: Help with Minecraft modding (Java Edition)
Hello there. I would like to make a recipe for my mod, but the problem is I don’t know how to create «any» procedure. I mean you can use «any wood», «any potion», «any planks» for recipe, but if I have many similar items, like 10 crystals, and I would like to make one recipe with «any crystal», but not making 10000 new recipes with different crystals position. Thanks
You can do this with Tags.
Make a new tag, "AnyCrystal"
Set namespace to "mod".
Add all your crystals to the tag list.
Make your new recipe, use any item as a dummy placeholder for your crystals.
Save.
Open the recipe element with the code editor.
Replace the dummy items with your tag and change the line label from "item" to "tag".
For example:
to
Scratch the part about making dummy items and code editing, I realized there is a better way, one can chose custom tags for components when defining a recipe.
When you open the window to select the items for a recipe input, at the lower right corner there is a button for [use tag], click it.
You can now type in your custom tag. For example : your_mod:any_crystal
If you choose to use "minecraft" as the namespace when making your custom tag, you can just type the tag name i.e. any_crystal