fix some tongs melting into unobtainable materials #3145

This commit is contained in:
Pyritie
2026-02-22 13:56:26 +00:00
parent 8beaace36f
commit 5acad92e54
4 changed files with 67 additions and 50 deletions

View File

@@ -3,6 +3,7 @@
## Unreleased
### Changes
### Bug fixes
- Fixed some tongs melting into unusable TFC metal fluids @Pyritie
### Translation updates
## [0.11.23] - 21-02-2026

View File

@@ -50,6 +50,19 @@ function processTFCArmor(event, material) {
addMaterialWelding(event, finishedBoots, unfinishedBoots, plateItem, material, 4, 0);
}
// Helper methods
function addToolExtruderRecipe(event, material, outputItem, inputItem, mold, id) {
event.recipes.vintageimprovements.curving(outputItem, inputItem)
.head(mold)
.id(`tfg:vi/curving/${material.getName()}_${id}`)
event.recipes.gtceu.extruder(`tfg:${material.getName()}_${id}`)
.itemInputs(inputItem)
.notConsumable(mold)
.itemOutputs(outputItem)
.duration(material.getMass() * 6)
.EUt(GTValues.VA[GTValues.LV])
}
/**
* Processes the TFC items for the TFC "tool material" metals
@@ -64,19 +77,7 @@ function processTFCTool(event, material) {
const doublePlateItem = ChemicalHelper.get(TagPrefix.plateDouble, material, 1);
const knifeHead = ChemicalHelper.get(TFGTagPrefix.toolHeadKnife, material, 1)
// Helper methods
function addExtruderRecipe(outputItem, inputItem, mold, id) {
event.recipes.vintageimprovements.curving(outputItem, inputItem)
.head(mold)
.id(`tfg:vi/curving/${materialName}_${id}`)
event.recipes.gtceu.extruder(`tfg:${materialName}_${id}`)
.itemInputs(inputItem)
.notConsumable(mold)
.itemOutputs(outputItem)
.duration(material.getMass() * 6)
.EUt(GTValues.VA[GTValues.LV])
}
// For tools that are pure TFC
@@ -84,13 +85,13 @@ function processTFCTool(event, material) {
// Tuyere
let tuyere = `tfc:metal/tuyere/${materialName}`;
addTFCMelting(event, tuyere, material, 144 * 2, 'tuyere');
addExtruderRecipe(tuyere, doublePlateItem, 'gtceu:bottle_extruder_mold', 'tuyere');
addToolExtruderRecipe(event, material, tuyere, doublePlateItem, 'gtceu:bottle_extruder_mold', 'tuyere');
addAnvilRecipe(event, tuyere, doublePlateItem, ['bend_last', 'bend_second_last'], true, material, 'tuyere');
// Shield
let shield = `tfc:metal/shield/${materialName}`;
addTFCMelting(event, shield, material, 144 * 2, 'shield');
addExtruderRecipe(shield, doublePlateItem, 'gtceu:plate_extruder_mold', 'shield');
addToolExtruderRecipe(event, material, shield, doublePlateItem, 'gtceu:plate_extruder_mold', 'shield');
addAnvilRecipe(event, shield, doublePlateItem, ['upset_last', 'bend_second_last', 'bend_third_last'], true, material, 'shield');
// Horse armor
@@ -142,32 +143,6 @@ function processTFCTool(event, material) {
addTFCMelting(event, scrapingKnife, material, 144 * 2, 'scraping_knife');
addMaterialRecyclingNoTagPrefix(event, scrapingKnifeBlade, material, 'scraping_knife_blade', 2);
addMaterialCasting(event, scrapingKnifeBlade, 'tfcscraping:ceramic/scraping_knife_blade_mold', false, null, material, 'scraping_knife_blade', 144 * 2);
// Tongs
let tongPart = `tfchotornot:tong_part/${materialName}`;
let tong = `tfchotornot:tongs/${materialName}`;
addExtruderRecipe(tongPart, ChemicalHelper.get(TagPrefix.rodLong, material, 1), 'gtceu:rod_extruder_mold', 'tong_part');
addMaterialRecyclingNoTagPrefix(event, tongPart, material, 'tong_part', 1);
addTFCMelting(event, tong, material, 144 * 2, 'tong');
event.recipes.tfc.advanced_shaped_crafting(
TFC.isp.of(tong).copyForgingBonus(), [
'AA',
'BC'
], {
A: tongPart,
B: Ingredient.of('#forge:bolts').subtract('gtceu:wood_bolt'),
C: '#forge:tools/hammers'
}, 0, 0).id(`tfchotornot:crafting/tongs/${materialName}`)
event.recipes.gtceu.forge_hammer(tong)
.itemInputs(`2x ${tongPart}`)
.itemOutputs(tong)
.duration(material.getMass())
.EUt(GTValues.VA[GTValues.ULV])
event.remove({ id: `tfchotornot:heating/tongs/${materialName}` })
event.remove({ id: `tfchotornot:heating/tong_part/${materialName}` })
}
// Sword
@@ -295,4 +270,40 @@ function processPlatedBlock(event, material) {
.EUt(GTValues.VA[GTValues.ULV])
addMaterialRecycling(event, platedStair, material, 'plated_stair', TFGTagPrefix.stairPlated);
}
/**
* @param {Internal.RecipesEventJS} event
* @param {GTMaterial} material
*/
function processTongs(event, material) {
// Skip cast iron
if (material === GTMaterials.Iron)
return;
const materialName = material.getName();
let tongPart = `tfchotornot:tong_part/${materialName}`;
let tong = `tfchotornot:tongs/${materialName}`;
addToolExtruderRecipe(event, material, tongPart, ChemicalHelper.get(TagPrefix.rodLong, material, 1), 'gtceu:rod_extruder_mold', 'tong_part');
addMaterialRecyclingNoTagPrefix(event, tongPart, material, 'tong_part', 1);
addTFCMelting(event, tong, material, 144 * 2, 'tong');
event.recipes.tfc.advanced_shaped_crafting(
TFC.isp.of(tong).copyForgingBonus(), [
'AA',
'BC'
], {
A: tongPart,
B: Ingredient.of('#forge:bolts').subtract('gtceu:wood_bolt'),
C: '#forge:tools/hammers'
}, 0, 0).id(`tfchotornot:crafting/tongs/${materialName}`)
event.recipes.gtceu.forge_hammer(tong)
.itemInputs(`2x ${tongPart}`)
.itemOutputs(tong)
.duration(material.getMass())
.EUt(GTValues.VA[GTValues.ULV])
event.remove({ id: `tfchotornot:heating/tongs/${materialName}` })
event.remove({ id: `tfchotornot:heating/tong_part/${materialName}` })
}

View File

@@ -313,6 +313,10 @@ function registerTFGMaterialRecipes(event) {
if (material.hasFlag(TFGMaterialFlags.HAS_TFC_TOOL) || material.hasFlag(TFGMaterialFlags.HAS_GT_TOOL)) {
processTFCTool(event, material)
}
if (material.hasFlag(TFGMaterialFlags.HAS_TFC_UTILITY)) {
processTongs(event, material)
}
const oreProperty = material.getProperty(PropertyKey.ORE);
if (oreProperty !== null) {

View File

@@ -225,16 +225,16 @@ const registerGTCEuMaterialModification = (event) => {
GTMaterials.Silver.addFlags(HAS_SMALL_TFC_ORE);
// Other materials that are compatible with TFC
GTMaterials.Iron.addFlags(GENERATE_DOUBLE_INGOTS);
GTMaterials.Gold.addFlags(GENERATE_DOUBLE_INGOTS);
GTMaterials.Bismuth.addFlags(GENERATE_DOUBLE_INGOTS);
GTMaterials.Brass.addFlags(GENERATE_DOUBLE_INGOTS);
GTMaterials.Nickel.addFlags(GENERATE_DOUBLE_INGOTS);
GTMaterials.RoseGold.addFlags(GENERATE_DOUBLE_INGOTS);
GTMaterials.Silver.addFlags(GENERATE_DOUBLE_INGOTS);
GTMaterials.Tin.addFlags(GENERATE_DOUBLE_INGOTS);
GTMaterials.Zinc.addFlags(GENERATE_DOUBLE_INGOTS, GENERATE_BOLT_SCREW);
GTMaterials.SterlingSilver.addFlags(GENERATE_DOUBLE_INGOTS);
GTMaterials.Iron.addFlags(GENERATE_DOUBLE_INGOTS, HAS_TFC_UTILITY);
GTMaterials.Gold.addFlags(GENERATE_DOUBLE_INGOTS, HAS_TFC_UTILITY);
GTMaterials.Bismuth.addFlags(GENERATE_DOUBLE_INGOTS, HAS_TFC_UTILITY);
GTMaterials.Brass.addFlags(GENERATE_DOUBLE_INGOTS, HAS_TFC_UTILITY);
GTMaterials.Nickel.addFlags(GENERATE_DOUBLE_INGOTS, HAS_TFC_UTILITY);
GTMaterials.RoseGold.addFlags(GENERATE_DOUBLE_INGOTS, HAS_TFC_UTILITY);
GTMaterials.Silver.addFlags(GENERATE_DOUBLE_INGOTS, HAS_TFC_UTILITY);
GTMaterials.Tin.addFlags(GENERATE_DOUBLE_INGOTS, HAS_TFC_UTILITY);
GTMaterials.Zinc.addFlags(GENERATE_DOUBLE_INGOTS, GENERATE_BOLT_SCREW, HAS_TFC_UTILITY);
GTMaterials.SterlingSilver.addFlags(GENERATE_DOUBLE_INGOTS, HAS_TFC_UTILITY);
GTMaterials.RedAlloy.addFlags(GENERATE_DOUBLE_INGOTS, GENERATE_SMALL_GEAR);
GTMaterials.TinAlloy.addFlags(GENERATE_DOUBLE_INGOTS);
@@ -291,6 +291,7 @@ const registerGTCEuMaterialModification = (event) => {
GTMaterials.Nickel.addFlags(GENERATE_ROD, GENERATE_LONG_ROD);
GTMaterials.Zinc.addFlags(GENERATE_LONG_ROD);
GTMaterials.Bismuth.addFlags(GENERATE_LONG_ROD);
GTMaterials.BlackSteel.addFlags(GENERATE_LONG_ROD, GENERATE_BOLT_SCREW);
GTMaterials.BlueSteel.addFlags(GENERATE_LONG_ROD, GENERATE_BOLT_SCREW, GENERATE_SPRING, GENERATE_SMALL_GEAR, GENERATE_FOIL);
GTMaterials.RedSteel.addFlags(GENERATE_LONG_ROD, GENERATE_BOLT_SCREW, GENERATE_FOIL);