-
Notifications
You must be signed in to change notification settings - Fork 0
Anvil
roidrole edited this page Oct 17, 2025
·
7 revisions
Allows modification of anvil recipes
Import :
import mods.roidtweaker.minecraft.Anvil;Requires config:event category.allowAnvilRecipes=true
| Method | Parameters | Description |
|---|---|---|
| addRecipe | left as IIngredient, right as IIngredient, output as IItemStack, xpCost as int | Adds an anvil recipe |
| addRecipeShapeless | left as IIngredient, right as IIngredient, output as IItemStack, xpCost as int | Adds a shapeless recipe to the anvil. Who's gonna stop you? |
| addRecipes | left as IIngredient, right as IIngredient[], output as IItemStack[], xpCost as int[] | Loops through the arrays calling addRecipe for each |
| remove | inputs as IIngredient[] | Prevents recipes based on inputs. If only one input is specified, the left one is used. Supports <*> |
| remove | output as IIngredient | Prevents anvil recipes outputting an item matching the provided IIngredient |
| addRepair | repaired as IIngredient, material as IIngredient, amount as int, @Optional xpCost as int | Adds a repair recipe to any items matching the repaired IIngredient with any item matching the material. The repaired amount per material is amount. xpCost is in levels. Default xpCost is the amount of the right input consumed |
| addRepair | repaired as IIngredient, material as IIngredient, amount as float, @Optional xpCost as int | Idem, but repair amount expressed as % of durability |
All methods support Ingredient Conditions and Ingredient Transformers