From 3eb0a5810ba13abb4f20dab300e9165b0355f612 Mon Sep 17 00:00:00 2001 From: Redeix Date: Thu, 5 Feb 2026 03:20:37 -0600 Subject: [PATCH] updated recycling recipes for wood (#2986) --- kubejs/server_scripts/ad_astra/recipes.js | 3 +- kubejs/server_scripts/afc/recipes.js | 41 +++++++++++++++++ .../server_scripts/asticor_carts/recipes.js | 44 ++++++++----------- kubejs/server_scripts/beneath/recipes.js | 39 ++++++++++++++++ kubejs/server_scripts/etched/recipes.js | 2 + kubejs/server_scripts/tacz/recipes.misc.js | 2 + kubejs/server_scripts/tfc/recipes.js | 41 +++++++++++++++++ 7 files changed, 144 insertions(+), 28 deletions(-) diff --git a/kubejs/server_scripts/ad_astra/recipes.js b/kubejs/server_scripts/ad_astra/recipes.js index e700d283b..ec330a56d 100644 --- a/kubejs/server_scripts/ad_astra/recipes.js +++ b/kubejs/server_scripts/ad_astra/recipes.js @@ -453,7 +453,7 @@ const registerAdAstraRecipes = (event) => { .itemOutputs('ad_astra:steel_door') .duration(100) .EUt(GTValues.VA[GTValues.LV]) - .addMaterialInfo(true, true) + TFGHelpers.registerMaterialInfo('ad_astra:steel_door', [GTMaterials.Steel, 2, GTMaterials.Glass, 3/4, GTMaterials.Polyethylene, 1/4]) event.recipes.gtceu.assembler(`tfg:ad_astra_steel_trapdoor`) .itemInputs('tfc:metal/trapdoor/steel', '#forge:glass_panes') @@ -461,7 +461,6 @@ const registerAdAstraRecipes = (event) => { .itemOutputs('ad_astra:steel_trapdoor') .duration(100) .EUt(GTValues.VA[GTValues.LV]) - TFGHelpers.registerMaterialInfo('ad_astra:steel_trapdoor', [GTMaterials.Steel, 1, GTMaterials.Glass, 3/4, GTMaterials.Polyethylene, 1/4]) // Etrium only has factory block, encased block, plateblock, panel, and (storage) block diff --git a/kubejs/server_scripts/afc/recipes.js b/kubejs/server_scripts/afc/recipes.js index 9f385e5c7..d9f0d6676 100644 --- a/kubejs/server_scripts/afc/recipes.js +++ b/kubejs/server_scripts/afc/recipes.js @@ -299,4 +299,45 @@ const registerAFCRecipes = (event) => { .processingTime(50 * global.VINTAGE_IMPROVEMENTS_DURATION_MULTIPLIER) .id(`tfg:vi/lathe/stripping_${x.wood}_wood`) }) + + /** + * @property {Array} afcWoodRecyclingIndex - Wood recycling material index. + */ + const afcWoodRecyclingIndex = [ + ['afc:wood/chest_minecart/{type}', ['{wood}', 4, GTMaterials.WroughtIron, 5]], + ['afc:wood/planks/{type}', ['{wood}', 8]], + ['afc:wood/planks/{type}_door', ['{wood}', 6]], + ['afc:wood/planks/{type}_trapdoor', ['{wood}', 4]], + ['afc:wood/planks/{type}_fence', ['{wood}', 4]], + ['afc:wood/planks/{type}_log_fence', ['{wood}', 8]], + ['afc:wood/planks/{type}_fence_gate', ['{wood}', 8]], + ['afc:wood/planks/{type}_slab', ['{wood}', 2]], + ['afc:wood/planks/{type}_stairs', ['{wood}', 3]], + ['afc:wood/planks/{type}_pressure_plate', ['{wood}', 4]], + ['afc:wood/planks/{type}_button', ['{wood}', 1]], + ['afc:wood/chest/{type}', ['{wood}', 16]], + ['afc:wood/trapped_chest/{type}', ['{wood}', 16, GTMaterials.WroughtIron, 4/9, GTMaterials.Wood, 1]] + ]; + /** + * @param {Array} materials + * @param {string} woodMaterial + * @return {Array} + */ + function resolveArgs(materials, woodMaterial) { + return materials.map(materials => materials === '{wood}' ? woodMaterial : materials); + }; + global.AFC_HARDWOOD_TYPES.forEach(type => { + afcWoodRecyclingIndex.forEach(([template, args]) => { + const item = template.replace('{type}', type); + const resolvedArgs = resolveArgs(args, GTMaterials.get('hardwood')); + TFGHelpers.registerMaterialInfo(item, resolvedArgs); + }); + }); + global.AFC_SOFTWOOD_TYPES.forEach(type => { + afcWoodRecyclingIndex.forEach(([template, args]) => { + const item = template.replace('{type}', type); + const resolvedArgs = resolveArgs(args, GTMaterials.Wood); + TFGHelpers.registerMaterialInfo(item, resolvedArgs); + }); + }); } diff --git a/kubejs/server_scripts/asticor_carts/recipes.js b/kubejs/server_scripts/asticor_carts/recipes.js index f7f477827..8a997bea4 100644 --- a/kubejs/server_scripts/asticor_carts/recipes.js +++ b/kubejs/server_scripts/asticor_carts/recipes.js @@ -2,31 +2,23 @@ "use strict"; const registerAsticorCartsRecipes = (event) => { - event.remove({ id: 'astikorcarts:animal_cart' }) - event.remove({ id: 'astikorcarts:supply_cart' }) - event.remove({ id: 'astikorcarts:plow' }) - event.remove({ id: 'astikorcarts:wheel' }) + event.remove({ id: 'astikorcarts:animal_cart' }); + event.remove({ id: 'astikorcarts:supply_cart' }); + event.remove({ id: 'astikorcarts:plow' }); + event.remove({ id: 'astikorcarts:wheel' }); - event.recipes.gtceu.macerator(`tfg:recycle_astikor_animal_cart`) - .itemInputs('#tfcastikorcarts:animal_cart') - .itemOutputs('#forge:dusts/brass') - .duration(100) - .category(GTRecipeCategories.MACERATOR_RECYCLING) - .EUt(GTValues.VA[GTValues.ULV]) + global.TFC_HARDWOOD_TYPES.forEach(type => { + TFGHelpers.registerMaterialInfo(`tfcastikorcarts:wheel/${type}`, [GTMaterials.get('hardwood'), 2]); + TFGHelpers.registerMaterialInfo(`tfcastikorcarts:supply_cart/${type}`, [GTMaterials.Brass, 1, GTMaterials.get('hardwood'), 8, GTMaterials.Wood, 12]); + TFGHelpers.registerMaterialInfo(`tfcastikorcarts:plow/${type}`, [GTMaterials.Brass, 1, GTMaterials.get('hardwood'), 8]); + TFGHelpers.registerMaterialInfo(`tfcastikorcarts:animal_cart/${type}`, [GTMaterials.Brass, 1, GTMaterials.get('hardwood'), 14]); + }); + global.TFC_SOFTWOOD_TYPES.forEach(type => { + TFGHelpers.registerMaterialInfo(`tfcastikorcarts:wheel/${type}`, [GTMaterials.Wood, 2]); + TFGHelpers.registerMaterialInfo(`tfcastikorcarts:supply_cart/${type}`, [GTMaterials.Brass, 1, GTMaterials.Wood, 20]); + TFGHelpers.registerMaterialInfo(`tfcastikorcarts:plow/${type}`, [GTMaterials.Brass, 1, GTMaterials.Wood, 8]); + TFGHelpers.registerMaterialInfo(`tfcastikorcarts:animal_cart/${type}`, [GTMaterials.Brass, 1, GTMaterials.Wood, 14]); + }); - event.recipes.gtceu.macerator(`tfg:recycle_astikor_supply_cart`) - .itemInputs('#tfcastikorcarts:supply_cart') - .itemOutputs('#forge:dusts/brass') - .duration(100) - .category(GTRecipeCategories.MACERATOR_RECYCLING) - .EUt(GTValues.VA[GTValues.ULV]) - - event.recipes.gtceu.macerator(`tfg:recycle_astikor_plow`) - .itemInputs('#tfcastikorcarts:plow') - .itemOutputs('#forge:dusts/brass') - .duration(100) - .category(GTRecipeCategories.MACERATOR_RECYCLING) - .EUt(GTValues.VA[GTValues.ULV]) - - event.replaceInput({ mod: 'tfcastikorcarts' }, '#forge:rods', '#mcw_tfc_aio:metal_rods') -} \ No newline at end of file + event.replaceInput({ mod: 'tfcastikorcarts' }, '#forge:rods', '#mcw_tfc_aio:metal_rods'); +}; \ No newline at end of file diff --git a/kubejs/server_scripts/beneath/recipes.js b/kubejs/server_scripts/beneath/recipes.js index e5182c117..0c35158d6 100644 --- a/kubejs/server_scripts/beneath/recipes.js +++ b/kubejs/server_scripts/beneath/recipes.js @@ -99,4 +99,43 @@ const registerBeneathRecipes = (event) => { ], { A: `beneath:wood/leaves/warped` }).id(`tfg:shaped/beneath/warped_leaves_to_fallen_leaves`); + + + /** + * @property {Array} beneathWoodRecyclingIndex - Wood recycling material index. + */ + const beneathWoodRecyclingIndex = [ + ['beneath:wood/chest_minecart/{type}', ['{wood}', 4, GTMaterials.WroughtIron, 5]], + ['beneath:wood/planks/{type}', ['{wood}', 8]], + ['beneath:wood/planks/{type}_door', ['{wood}', 6]], + ['beneath:wood/planks/{type}_trapdoor', ['{wood}', 4]], + ['beneath:wood/planks/{type}_fence', ['{wood}', 4]], + ['beneath:wood/planks/{type}_log_fence', ['{wood}', 8]], + ['beneath:wood/planks/{type}_fence_gate', ['{wood}', 8]], + ['beneath:wood/planks/{type}_slab', ['{wood}', 2]], + ['beneath:wood/planks/{type}_stairs', ['{wood}', 3]], + ['beneath:wood/planks/{type}_pressure_plate', ['{wood}', 4]], + ['beneath:wood/planks/{type}_button', ['{wood}', 1]], + ['beneath:wood/chest/{type}', ['{wood}', 16]], + ['beneath:wood/trapped_chest/{type}', ['{wood}', 16, GTMaterials.WroughtIron, 4/9, GTMaterials.Wood, 1]] + ]; + /** + * @param {Array} materials + * @param {string} woodMaterial + * @return {Array} + */ + function resolveArgs(materials, woodMaterial) { + return materials.map(materials => materials === '{wood}' ? woodMaterial : materials); + }; + + beneathWoodRecyclingIndex.forEach(([template, args]) => { + const item = template.replace('{type}', 'crimson'); + const resolvedArgs = resolveArgs(args, GTMaterials.get('hardwood')); + TFGHelpers.registerMaterialInfo(item, resolvedArgs); + }); + beneathWoodRecyclingIndex.forEach(([template, args]) => { + const item = template.replace('{type}', 'warped'); + const resolvedArgs = resolveArgs(args, GTMaterials.Wood); + TFGHelpers.registerMaterialInfo(item, resolvedArgs); + }); } \ No newline at end of file diff --git a/kubejs/server_scripts/etched/recipes.js b/kubejs/server_scripts/etched/recipes.js index 021999a1c..66bb5a409 100644 --- a/kubejs/server_scripts/etched/recipes.js +++ b/kubejs/server_scripts/etched/recipes.js @@ -72,4 +72,6 @@ const registerEtchedRecipes = (event) => { event.shapeless('create_connected:music_disc_elevator', ['etched:blank_music_disc', 'create:elevator_pulley']) //dear god why event.shapeless('gtceu:sus_record', ['etched:blank_music_disc', '#tfc:knives', 'tfc:food/green_bean']).id('tfg:sus_record'); + + TFGHelpers.registerMaterialInfo('etched:jukebox_minecart', [GTMaterials.WroughtIron, 5, GTMaterials.Wood, 16, GTMaterials.Diamond, 1]); } \ No newline at end of file diff --git a/kubejs/server_scripts/tacz/recipes.misc.js b/kubejs/server_scripts/tacz/recipes.misc.js index f0d7632f7..bd0fd23ab 100644 --- a/kubejs/server_scripts/tacz/recipes.misc.js +++ b/kubejs/server_scripts/tacz/recipes.misc.js @@ -74,4 +74,6 @@ function registerTACZMiscRecipes(event) { .itemOutputs('tfg:certus_mechanism') .EUt(GTValues.VA[GTValues.EV]) .duration(80) + + TFGHelpers.registerMaterialInfo('tacz:target_minecart', [GTMaterials.WroughtIron, 5, GTMaterials.Steel, 1, GTMaterials.Wood, 1]); } diff --git a/kubejs/server_scripts/tfc/recipes.js b/kubejs/server_scripts/tfc/recipes.js index b51634c4d..a84425475 100644 --- a/kubejs/server_scripts/tfc/recipes.js +++ b/kubejs/server_scripts/tfc/recipes.js @@ -290,4 +290,45 @@ const registerTFCRecipes = (event) => { A: `tfc:wood/sapling/${type}` }).id(`tfg:shaped/tfc/${type}_krummholz`); }); + + /** + * @property {Array} tfcWoodRecyclingIndex - Wood recycling material index. + */ + const tfcWoodRecyclingIndex = [ + ['tfc:wood/chest_minecart/{type}', ['{wood}', 4, GTMaterials.WroughtIron, 5]], + ['tfc:wood/planks/{type}', ['{wood}', 8]], + ['tfc:wood/planks/{type}_door', ['{wood}', 6]], + ['tfc:wood/planks/{type}_trapdoor', ['{wood}', 4]], + ['tfc:wood/planks/{type}_fence', ['{wood}', 4]], + ['tfc:wood/planks/{type}_log_fence', ['{wood}', 8]], + ['tfc:wood/planks/{type}_fence_gate', ['{wood}', 8]], + ['tfc:wood/planks/{type}_slab', ['{wood}', 2]], + ['tfc:wood/planks/{type}_stairs', ['{wood}', 3]], + ['tfc:wood/planks/{type}_pressure_plate', ['{wood}', 4]], + ['tfc:wood/planks/{type}_button', ['{wood}', 1]], + ['tfc:wood/chest/{type}', ['{wood}', 16]], + ['tfc:wood/trapped_chest/{type}', ['{wood}', 16, GTMaterials.WroughtIron, 4/9, GTMaterials.Wood, 1]] + ]; + /** + * @param {Array} materials + * @param {string} woodMaterial + * @return {Array} + */ + function resolveArgs(materials, woodMaterial) { + return materials.map(materials => materials === '{wood}' ? woodMaterial : materials); + }; + global.TFC_HARDWOOD_TYPES.forEach(type => { + tfcWoodRecyclingIndex.forEach(([template, args]) => { + const item = template.replace('{type}', type); + const resolvedArgs = resolveArgs(args, GTMaterials.get('hardwood')); + TFGHelpers.registerMaterialInfo(item, resolvedArgs); + }); + }); + global.TFC_SOFTWOOD_TYPES.forEach(type => { + tfcWoodRecyclingIndex.forEach(([template, args]) => { + const item = template.replace('{type}', type); + const resolvedArgs = resolveArgs(args, GTMaterials.Wood); + TFGHelpers.registerMaterialInfo(item, resolvedArgs); + }); + }); }