Anvil - StrayWolfe/TFC-Tweaker GitHub Wiki
Anvil Tiers
Stone=0
Copper=1
Bronze=2, Bismuth Bronze=2, Black Bronze=2, Rose Gold=2
Wrought Iron=3
Steel=4
Black Steel=5
Red Steel=6
Blue Steel=7
Default Plan Names
Components: "ingot", "sheet", "refinebloom", "splitbloom"
Tools: "pickaxe", "shovel", "axe", "hoe", "hammer", "chisel", "propick", "saw", "scythe", "bucket", "shears", "tuyere", "knife"
Weapons: "sword", "mace", "javelin"
Armor: "chestplate", "legsplate", "bootsplate", "helmplate"
Misc: "trapdoor", "grill", "oillamp", "hopper"
#Anvil Recipes ##Add Anvil Recipe Output Stack, Input Stack 1, Input Stack 2[Optional], Plan Name, Minimal Anvil Tier (Range 0-7) (Has support for item reuse and transformation functions for Input Stack 1 and Input Stack 2)
mods.Terrafirmacraft.Anvil.addAnvilRecipe(<minecraft:shears>, <terrafirmacraft:item.Wrought Iron Sheet>, <terrafirmacraft:item.Wrought Iron Sheet>, "shears", 3);
mods.Terrafirmacraft.Anvil.addAnvilRecipe(<minecraft:iron_sword>, <minecraft:iron_ingot>, "sword", 3);
##Remove Anvil Recipe
Output Stack, Input Stack 1, Input Stack 2 [Optional], Plan Name, Minimal Anvil Tier (Range 0-7)
mods.Terrafirmacraft.Anvil.removeAnvilRecipe(<terrafirmacraft:item.shears>,<terrafirmacraft:item.Wrought Iron Knife Blade>,<terrafirmacraft:item.Wrought Iron Knife Blade>,"shears",3);
mods.Terrafirmacraft.Anvil.removeAnvilRecipe(<terrafirmacraft:item.Wrought Iron Scythe Blade>, <terrafirmacraft:item.Wrought Iron Ingot>, "scythe", 3);
#Welding Recipes ##Add Welding Recipe
Output Stack, Input Stack 1, Input Stack 2, Minimal Anvil Tier (Range 0-7)
mods.Terrafirmacraft.Anvil.addWeldRecipe(<terrafirmacraft:item.Wrought Iron Double Ingot>, <minecraft:iron_ingot>, <minecraft:iron_ingot>, 1);
##Remove Welding Recipe
Output Stack, Input Stack 1, Input Stack 2, Minimal Anvil Tier (Range 0-6)
mods.Terrafirmacraft.Anvil.removeWeldRecipe(<terrafirmacraft:item.Wrought Iron Double Ingot>, <terrafirmacraft:item.Wrought Iron Ingot>,<terrafirmacraft:item.Wrought Iron Ingot>, 2);
#Anvil Plans
To show proper custom plan name, use the minetweaker method "game.setLocalization" to add localization.
Set translation but only if language is en_US:
game.setLocalization("en_US", "gui.plans.vanillasword", "Vanilla Sword");
You will want to use this one most of the time, it overrides no matter the language:
game.setLocalization("gui.plans.vanillasword", "Vanilla Sword");
Anvil plans also contain the rules used in the anvil to create the desired item. The following list contains the numerical representations of each rule.
Plan Rules
Any=1, BendAny=2, BendLast=3, BendLastTwo=4, BendNotLast=5, BendSecondFromLast=6, BendThirdFromLast=7, DrawAny=8, DrawLast=9, DrawLastTwo=10, DrawNotLast=11, DrawSecondFromLast=12, DrawThirdFromLast=13, HitAny=14, HitLast=15, HitLastTwo=16, HitNotLast=17, HitSecondFromLast=18, HitThirdFromLast=19, PunchAny=20, PunchLast=21, PunchLastTwo=22, PunchNotLast=23, PunchSecondFromLast=24, PunchThridFromLast=25, ShrinkAny=26, ShrinkLast=27, ShrinkLastTwo=28, ShrinkNotLast=29, ShrinkSecondFromLast=30, ShrinkThirdFromLast=31, UpsetAny=32, UpetLast=33, UpsetLastTwo=34, UpsetNotLast=35, UpsetSecondFromLast=36, UpsetThirdFromLast=37
##Add Plan
Plan Name, Last Hit, Hit 2nd From Last, Hit 3rd From Last
mods.Terrafirmacraft.Anvil.addPlanRecipe("vanillasword", 33, 8, 19);
##Remove Plan
Plan Name, Last Hit, Hit 2nd From Last, Hit 3rd From Last
mods.Terrafirmacraft.Anvil.removePlanRecipe("sword", 15, 6, 7);