diff --git a/docs/1.12/content/Mods/RockyTweaks/Anvil.md b/docs/1.12/content/Mods/RockyTweaks/Anvil.md index dda4b4334518..00d364c8c112 100644 --- a/docs/1.12/content/Mods/RockyTweaks/Anvil.md +++ b/docs/1.12/content/Mods/RockyTweaks/Anvil.md @@ -6,37 +6,30 @@ ## Addition -### Single +### Basic -Creates individual anvil recipes that a displayed separately in JEI. +Creates an anvil recipe that is displayed separately in JEI. ```zenscript -// addRecipe(IItemstack input1, IItemstack input2, IItemstack output, int exp-cost); -mods.rockytweaks.Anvil.addRecipe(, * 8, .withTag({StoredEnchantments: [{lvl: 1 as short, id: 16 as short}]}), 5); +// addRecipe(IIngredient left, IIngredient right, IItemStack output, int expCost); +Anvil.addRecipe(, * 8, .withTag({StoredEnchantments: [{lvl: 1 as short, id: 16 as short}]}), 5); ``` -### Recipe Set +### With Function -Creates multiple anvil recipes that JEI cycles through the possible options. +Creates an anvil recipe that determines its output based on a [Recipe Function](/Vanilla/Recipes/Crafting/Recipe_Functions#irecipefunction) passed into it. ```zenscript -// addRecipe(IItemstack input1, IItemstack[] input2, IItemstack[] output, int[] exp-cost); -mods.rockytweaks.Anvil.addRecipe(, - [ - * 8, - * 16, - * 32 - ], - [ - .withTag({StoredEnchantments: [{lvl: 1 as short, id: 16 as short}]}), - .withTag({StoredEnchantments: [{lvl: 2 as short, id: 16 as short}]}), - .withTag({StoredEnchantments: [{lvl: 3 as short, id: 16 as short}]}) - ], - [ - 5, - 15, - 32 - ] +// addRecipe(IIngredient left, IIngredient right, IItemStack output, int expCost, IRecipeFunction function); +Anvil.addRecipe(, , , 1, + function(output, input, craftinginfo) { + if (!isNull(input.right.tag.display) + && !isNull(input.right.tag.display.Name) + && input.right.tag.display.Name == "Good Taco Seasoning") { + return ; + } + return output; + } ); ``` @@ -45,15 +38,16 @@ mods.rockytweaks.Anvil.addRecipe(, The anvil does not use recipes in the normal sense but you are still able to remove/blacklist specific inputs or outputs. ```zenscript -// remove(IIngredient[] inputs) -// remove(IIngredient output) - Remove an output +// Remove input(s) - remove(IIngredient[] inputs) +// Remove output - remove(IIngredient output) +// Remove all vanilla recipes - removeAll() // Blacklist Mending Enchant (input) Anvil.remove([.withTag({StoredEnchantments: [{lvl: 1 as short, id: 70 as short}]})]); // Blacklist Sharpness V on a Diamond Sword (inputs) -mods.rockytweaks.Anvil.remove([, .withTag({StoredEnchantments: [{lvl: 5 as short, id: 16 as short}]})]); +Anvil.remove([, .withTag({StoredEnchantments: [{lvl: 5 as short, id: 16 as short}]})]); // Blacklist Enchanted Books (output) -mods.rockytweaks.Anvil.remove(); +Anvil.remove(); ```