-
-
Notifications
You must be signed in to change notification settings - Fork 3
Recipes
The recipes module contains only the dynamic recipes. The other recipes have to be added manually.
To do anything with recipes you need to create a class extending the ARecipeRegistry
class or use a pre-made class for a specific version.
Pre-made classes:
- RecipeRegistry_v1_7
- RecipeRegistry_v1_8
The recipe registry not only contains crafting recipes but also smelting and villager recipes.
There is no default implementation for shapeless or shaped recipes. You have to create your own class implementing ICraftingRecipe
or use a pre-made class for a specific version.
recipeRegistry.registerCraftingRecipe(craftingRecipe);
Smelting recipes only require an input item and a output item.
To register a smelting recipe you can use the registerFurnaceRecipe
method:
recipeRegistry.registerFurnaceRecipe(inputStack, outputStack);
Villager recipes require an input item, second optional input item and output item.
Since villager recipes can be disabled there is another method with an additional boolean parameter.
recipeRegistry.registerFurnaceRecipe(inputStack1, intputStack2);
recipeRegistry.registerFurnaceRecipe(inputStack1, intputStack2, enabled);
Villager recipes are dynamically sent to the client so you have to clear the villager recipes list before adding new ones.