diff --git a/kubejs/server_scripts/tfc/constants.js b/kubejs/server_scripts/tfc/constants.js index bb7fe266e..ab3c7b621 100644 --- a/kubejs/server_scripts/tfc/constants.js +++ b/kubejs/server_scripts/tfc/constants.js @@ -199,16 +199,16 @@ const ItemHeats = { "anvil": { heat_capacity: 40.0, metal_amount: 2016, input: (name) => { return { item: `tfc:metal/anvil/${name}` } }, output: (name) => { return { item: `tfc:metal/anvil/${name}` } } }, - "chain": { heat_capacity: 0.171, metal_amount: 9, rules: [ "hit_any", "hit_any", "draw_last" ], + "chain": { heat_capacity: 0.171, metal_amount: 9, rules: [ "hit_any", "hit_any", "draw_last" ], anvilFrom: "ingot", input: (name) => { return { item: `tfc:metal/chain/${name}` } }, output: (name) => { return { item: `tfc:metal/chain/${name}` } } }, - "bars": { heat_capacity: 0.714, metal_amount: 36, rules: [ "upset_last", "punch_second_last", "punch_third_last" ], + "bars": { heat_capacity: 0.714, metal_amount: 36, rules: [ "upset_last", "punch_second_last", "punch_third_last" ], anvilFrom: "sheet", input: (name) => { return { item: `tfc:metal/bars/${name}` } }, output: (name) => { return { item: `tfc:metal/bars/${name}` } } }, - "trapdoor": { heat_capacity: 5.714, metal_amount: 288, rules: [ "bend_last", "draw_second_last", "draw_third_last" ], + "trapdoor": { heat_capacity: 5.714, metal_amount: 288, rules: [ "bend_last", "draw_second_last", "draw_third_last" ], anvilFrom: "sheet", input: (name) => { return { item: `tfc:metal/trapdoor/${name}` } }, output: (name) => { return { item: `tfc:metal/trapdoor/${name}` } } }, - "lamp": { heat_capacity: 2.857, metal_amount: 144, rules: [ "bend_last", "bend_second_last", "draw_third_last" ], + "lamp": { heat_capacity: 2.857, metal_amount: 144, rules: [ "bend_last", "bend_second_last", "draw_third_last" ], anvilFrom: "ingot", input: (name) => { return { item: `tfc:metal/lamp/${name}` } }, output: (name) => { return { item: `tfc:metal/lamp/${name}` } } }, "unfinished_lamp": { heat_capacity: 2.857, metal_amount: 144, @@ -227,16 +227,16 @@ const ItemHeats = { "boots": { heat_capacity: 11.429, metal_amount: 576, hasDur: true, input: (name) => { return { item: `tfc:metal/boots/${name}` } }, output: (name) => { return { item: `tfc:metal/boots/${name}` } } }, - "unfinished_boots": { heat_capacity: 5.714, metal_amount: 288, rules: [ "bend_last", "bend_second_last", "shrink_third_last" ], + "unfinished_boots": { heat_capacity: 5.714, metal_amount: 288, rules: [ "bend_last", "bend_second_last", "shrink_third_last" ], anvilFrom: "ingot", input: (name) => { return { item: `tfc:metal/unfinished_boots/${name}` } }, output: (name) => { return { item: `tfc:metal/unfinished_boots/${name}` } } }, - "unfinished_chestplate": { heat_capacity: 11.429, metal_amount: 576, rules: [ "hit_last", "hit_second_last", "upset_third_last" ], + "unfinished_chestplate": { heat_capacity: 11.429, metal_amount: 576, rules: [ "hit_last", "hit_second_last", "upset_third_last" ], anvilFrom: "ingot", input: (name) => { return { item: `tfc:metal/unfinished_chestplate/${name}` } }, output: (name) => { return { item: `tfc:metal/unfinished_chestplate/${name}` } } }, - "unfinished_greaves": { heat_capacity: 11.429, metal_amount: 576, rules: [ "bend_any", "draw_any", "hit_any" ], + "unfinished_greaves": { heat_capacity: 11.429, metal_amount: 576, rules: [ "bend_any", "draw_any", "hit_any" ], anvilFrom: "ingot", input: (name) => { return { item: `tfc:metal/unfinished_greaves/${name}` } }, output: (name) => { return { item: `tfc:metal/unfinished_greaves/${name}` } } }, - "unfinished_helmet": { heat_capacity: 11.429, metal_amount: 576, rules: [ "hit_last", "bend_second_last", "bend_third_last" ], + "unfinished_helmet": { heat_capacity: 11.429, metal_amount: 576, rules: [ "hit_last", "bend_second_last", "bend_third_last" ], anvilFrom: "ingot", input: (name) => { return { item: `tfc:metal/unfinished_helmet/${name}` } }, output: (name) => { return { item: `tfc:metal/unfinished_helmet/${name}` } } }, @@ -244,97 +244,97 @@ const ItemHeats = { input: (name) => { return { item: `tfc:metal/horse_armor/${name}` } }, output: (name) => { return { item: `tfc:metal/horse_armor/${name}` } } }, - "sword_blade": { heat_capacity: 5.714, metal_amount: 288, hasMold: true, rules: [ "hit_last", "bend_second_last", "bend_third_last" ], + "sword_blade": { heat_capacity: 5.714, metal_amount: 288, hasMold: true, rules: [ "hit_last", "bend_second_last", "bend_third_last" ], anvilFrom: "double_ingot", input: (name) => { return { tag: `forge:sword_heads/${name}` } }, output: (name) => { return { item: `gtceu:${name}_sword_head` } } }, "sword": { heat_capacity: 5.714, metal_amount: 288, hasDur: true, input: (name) => { return { item: `gtceu:${name}_sword` } }, output: (name) => { return { item: `gtceu:${name}_sword` } } }, - "pickaxe_head": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "punch_last", "bend_not_last", "draw_not_last" ], + "pickaxe_head": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "punch_last", "bend_not_last", "draw_not_last" ], anvilFrom: "ingot", input: (name) => { return { tag: `forge:pickaxe_heads/${name}` } }, output: (name) => { return { item: `gtceu:${name}_pickaxe_head` } } }, "pickaxe": { heat_capacity: 2.857, metal_amount: 144, hasDur: true, input: (name) => { return { item: `gtceu:${name}_pickaxe` } }, output: (name) => { return { item: `gtceu:${name}_pickaxe` } } }, - "axe_head": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "punch_last", "hit_second_last", "upset_third_last" ], + "axe_head": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "punch_last", "hit_second_last", "upset_third_last" ], anvilFrom: "ingot", input: (name) => { return { tag: `forge:axe_heads/${name}` } }, output: (name) => { return { item: `gtceu:${name}_axe_head` } } }, "axe": { heat_capacity: 2.857, metal_amount: 144, hasDur: true, input: (name) => { return { item: `gtceu:${name}_axe` } }, output: (name) => { return { item: `gtceu:${name}_axe` } } }, - "shovel_head": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "punch_last", "hit_not_last" ], + "shovel_head": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "punch_last", "hit_not_last" ], anvilFrom: "ingot", input: (name) => { return { tag: `forge:shovel_heads/${name}` } }, output: (name) => { return { item: `gtceu:${name}_shovel_head` } } }, "shovel": { heat_capacity: 2.857, metal_amount: 144, hasDur: true, input: (name) => { return { item: `gtceu:${name}_shovel` } }, output: (name) => { return { item: `gtceu:${name}_shovel` } } }, - "hammer_head": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "punch_last", "shrink_not_last" ], + "hammer_head": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "punch_last", "shrink_not_last" ], anvilFrom: "ingot", input: (name) => { return { tag: `forge:hammer_heads/${name}` } }, output: (name) => { return { item: `gtceu:${name}_hammer_head` } } }, "hammer": { heat_capacity: 2.857, metal_amount: 144, hasDur: true, input: (name) => { return { item: `gtceu:${name}_hammer` } }, output: (name) => { return { item: `gtceu:${name}_hammer` } } }, - "hoe_head": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "punch_last", "hit_not_last", "bend_not_last" ], + "hoe_head": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "punch_last", "hit_not_last", "bend_not_last" ], anvilFrom: "ingot", input: (name) => { return { tag: `forge:hoe_heads/${name}` } }, output: (name) => { return { item: `gtceu:${name}_hoe_head` } } }, "hoe": { heat_capacity: 2.857, metal_amount: 144, hasDur: true, input: (name) => { return { item: `gtceu:${name}_hoe` } }, output: (name) => { return { item: `gtceu:${name}_hoe` } } }, - "knife_blade": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "hit_last", "draw_second_last", "draw_third_last" ], + "knife_blade": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "hit_last", "draw_second_last", "draw_third_last" ], anvilFrom: "ingot", input: (name) => { return { tag: `forge:knife_heads/${name}` } }, output: (name) => { return { item: `gtceu:${name}_knife_head` } } }, "knife": { heat_capacity: 2.857, metal_amount: 144, hasDur: true, input: (name) => { return { item: `gtceu:${name}_knife` } }, output: (name) => { return { item: `gtceu:${name}_knife` } } }, - "saw_blade": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "hit_last", "hit_second_last" ], + "saw_blade": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "hit_last", "hit_second_last" ], anvilFrom: "ingot", input: (name) => { return { tag: `forge:saw_heads/${name}` } }, output: (name) => { return { item: `gtceu:${name}_saw_head` } } }, "saw": { heat_capacity: 2.857, metal_amount: 144, hasDur: true, input: (name) => { return { item: `gtceu:${name}_saw` } }, output: (name) => { return { item: `gtceu:${name}_saw` } } }, - "scythe_blade": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "hit_last", "draw_second_last", "bend_third_last" ], + "scythe_blade": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "hit_last", "draw_second_last", "bend_third_last" ], anvilFrom: "ingot", input: (name) => { return { tag: `forge:scythe_heads/${name}` } }, output: (name) => { return { item: `gtceu:${name}_scythe_head` } } }, "scythe": { heat_capacity: 2.857, metal_amount: 144, hasDur: true, input: (name) => { return { item: `gtceu:${name}_scythe` } }, output: (name) => { return { item: `gtceu:${name}_scythe` } } }, - "chisel_head": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "hit_last", "hit_not_last", "draw_not_last" ], + "chisel_head": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "hit_last", "hit_not_last", "draw_not_last" ], anvilFrom: "ingot", input: (name) => { return { item: `tfc:metal/chisel_head/${name}` } }, output: (name) => { return { item: `tfc:metal/chisel_head/${name}` } }, }, "chisel": { heat_capacity: 2.857, metal_amount: 144, hasDur: true, input: (name) => { return { item: `tfc:metal/chisel/${name}` } }, output: (name) => { return { item: `tfc:metal/chisel/${name}` } } }, - "javelin_head": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "hit_last", "hit_second_last", "draw_third_last" ], + "javelin_head": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "hit_last", "hit_second_last", "draw_third_last" ], anvilFrom: "ingot", input: (name) => { return { item: `tfc:metal/javelin_head/${name}` } }, output: (name) => { return { item: `tfc:metal/javelin_head/${name}` } } }, "javelin": { heat_capacity: 2.857, metal_amount: 144, hasDur: true, input: (name) => { return { item: `tfc:metal/javelin/${name}` } }, output: (name) => { return { item: `tfc:metal/javelin/${name}` } } }, - "propick_head": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "punch_last", "draw_not_last", "bend_not_last" ], + "propick_head": { heat_capacity: 2.857, metal_amount: 144, hasMold: true, rules: [ "punch_last", "draw_not_last", "bend_not_last" ], anvilFrom: "ingot", input: (name) => { return { item: `tfc:metal/propick_head/${name}` } }, output: (name) => { return { item: `tfc:metal/propick_head/${name}` } } }, "propick": { heat_capacity: 2.857, metal_amount: 144, hasDur: true, input: (name) => { return { item: `tfc:metal/propick/${name}` } }, output: (name) => { return { item: `tfc:metal/propick/${name}` } } }, - "mace_head": { heat_capacity: 5.714, metal_amount: 288, hasMold: true, rules: [ "hit_last", "shrink_not_last", "bend_not_last" ], + "mace_head": { heat_capacity: 5.714, metal_amount: 288, hasMold: true, rules: [ "hit_last", "shrink_not_last", "bend_not_last" ], anvilFrom: "double_ingot", input: (name) => { return { item: `tfc:metal/mace_head/${name}` } }, output: (name) => { return { item: `tfc:metal/mace_head/${name}` } } }, "mace": { heat_capacity: 5.714, metal_amount: 288, hasDur: true, input: (name) => { return { item: `tfc:metal/mace/${name}` } }, output: (name) => { return { item: `tfc:metal/mace/${name}` } } }, - "fish_hook": { heat_capacity: 5.714, metal_amount: 288, rules: [ "draw_not_last", "bend_any", "hit_any" ], + "fish_hook": { heat_capacity: 5.714, metal_amount: 288, rules: [ "draw_not_last", "bend_any", "hit_any" ], anvilFrom: "sheet", input: (name) => { return { item: `tfc:metal/fish_hook/${name}` } }, output: (name) => { return { item: `tfc:metal/fish_hook/${name}` } } }, "fishing_rod": { heat_capacity: 5.714, metal_amount: 288, hasDur: true, input: (name) => { return { item: `tfc:metal/fishing_rod/${name}` } }, output: (name) => { return { item: `tfc:metal/fishing_rod/${name}` } } }, - "tuyere": { heat_capacity: 11.429, metal_amount: 576, hasDur: true, rules: [ "bend_last", "bend_second_last" ], + "tuyere": { heat_capacity: 11.429, metal_amount: 576, hasDur: true, rules: [ "bend_last", "bend_second_last" ], anvilFrom: "double_sheet", input: (name) => { return { item: `tfc:metal/tuyere/${name}` } }, output: (name) => { return { item: `tfc:metal/tuyere/${name}` } } }, "shears": { heat_capacity: 5.714, metal_amount: 288, hasDur: true, input: (name) => { return { item: `tfc:metal/shears/${name}` } }, output: (name) => { return { item: `tfc:metal/shears/${name}` } } }, - "shield": { heat_capacity: 11.429, metal_amount: 576, hasDur: true, rules: [ "upset_last", "bend_second_last", "bend_third_last" ], + "shield": { heat_capacity: 11.429, metal_amount: 576, hasDur: true, rules: [ "upset_last", "bend_second_last", "bend_third_last" ], anvilFrom: "double_sheet", input: (name) => { return { item: `tfc:metal/shield/${name}` } }, output: (name) => { return { item: `tfc:metal/shield/${name}` } } }, @@ -344,13 +344,13 @@ const ItemHeats = { "double_ingot": { heat_capacity: 5.714, metal_amount: 288, input: (name) => { return { item: `tfc:metal/double_ingot/${name}` } }, output: (name) => { return { item: `tfc:metal/double_ingot/${name}` } } }, - "sheet": { heat_capacity: 5.714, metal_amount: 288, rules: [ "hit_last", "hit_second_last", "hit_third_last" ], + "sheet": { heat_capacity: 5.714, metal_amount: 288, rules: [ "hit_last", "hit_second_last", "hit_third_last" ], anvilFrom: "double_ingot", input: (name) => { return { tag: `forge:plates/${name}` } }, output: (name) => { return { item: `gtceu:${name}_plate` } } }, "double_sheet": { heat_capacity: 11.429, metal_amount: 576, input: (name) => { return { tag: `forge:plates/double/${name}` } }, output: (name) => { return { item: `gtceu:${name}_double_plate` } } }, - "rod": { heat_capacity: 1.429, metal_amount: 72, rules: [ "bend_last", "draw_second_last", "draw_third_last" ], + "rod": { heat_capacity: 1.429, metal_amount: 72, rules: [ "bend_last", "draw_second_last", "draw_third_last" ], anvilFrom: "ingot", input: (name) => { return { tag: `forge:rods/${name}` } }, output: (name) => { return { item: `gtceu:${name}_rod` } } }, } diff --git a/kubejs/server_scripts/tfc/recipes.js b/kubejs/server_scripts/tfc/recipes.js index 0e5d4485b..7f25e803c 100644 --- a/kubejs/server_scripts/tfc/recipes.js +++ b/kubejs/server_scripts/tfc/recipes.js @@ -650,7 +650,8 @@ const registerAutoTFCAnvilRecipes = (event) => { { let recipeId = `tfc:recipes/anvil/tfg/${propertyName}_${tfcMetalName}` - let input = property.input(tfcMetalName) + let innerProp = ItemHeats[property.anvilFrom] + let input = innerProp.input(tfcMetalName) let output = property.output(tfcMetalName) addAnvilRecipe(event, recipeId, input, output, metalSpecifications.tier, property.rules)