How do I add a custom crafting recipe in minecraft fabric?
- User
How do I add a custom crafting recipe in minecraft fabric?
Assistant
Here are the steps to add a custom crafting recipe in Minecraft Fabric:
-
Create a java class to hold your recipe and extend
ShapedRecipeorShapelessRecipe. For a shaped recipe, you need to specify the pattern, keys, and result. For a shapeless recipe, you specify the ingredients and result. -
Register your recipe in the
registerRecipesmethod using theRecipeManager.
For example:
javaRecipeManager manager = new RecipeManager(); manager.register(new MyCustomShapedRecipe());-
Add the
modidfield with your mod's ID. This namespaces the recipe to your mod.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.