From 4fcbb759427bd007aed354b30d8d1fa3dbd58339 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sun, 8 Sep 2024 00:34:08 +0700 Subject: [PATCH] more recipes --- kubejs/server_scripts/gregtech/recipes.js | 1447 ++++++++--------- kubejs/server_scripts/tfc/recipes.js | 233 +-- kubejs/startup_scripts/gregtech/blocks.js | 16 + kubejs/startup_scripts/gregtech/machines.js | 2 +- kubejs/startup_scripts/main_startup_script.js | 4 +- 5 files changed, 818 insertions(+), 884 deletions(-) create mode 100644 kubejs/startup_scripts/gregtech/blocks.js diff --git a/kubejs/server_scripts/gregtech/recipes.js b/kubejs/server_scripts/gregtech/recipes.js index f20baf29b..8526f00df 100644 --- a/kubejs/server_scripts/gregtech/recipes.js +++ b/kubejs/server_scripts/gregtech/recipes.js @@ -2,6 +2,675 @@ const registerGregTechRecipes = (event) => { + //#region Крафты и раскрафты металлических предметов + const makeToolRecipe = (toolType, headTagPrefix, material) => { + const toolItem = ToolHelper.get(toolType, material) + if (toolItem.isEmpty()) return + + const toolHeadItem = ChemicalHelper.get(headTagPrefix, material, 1) + if (toolHeadItem.isEmpty()) return + + if (material.hasFlag(TFGMaterialFlags.HAS_TFC_TOOL)) { + event.shapeless(toolItem, [ + '#forge:rods/wooden', + toolHeadItem + ]).id(`gtceu:shaped/${toolType.name}_${material.getName()}`) + } + else { + event.recipes.tfc.advanced_shapeless_crafting(TFC.itemStackProvider.of(toolHeadItem).copyForgingBonus(), ['#forge:rods/wooden', toolHeadItem]) + .id(`gtceu:shaped/${toolType.name}_${material.getName()}`) + } + } + + const processToolSword = (toolType, headTagPrefix, material) => { + makeToolRecipe(toolType, headTagPrefix, material) + } + + const processToolPickaxe = (toolType, headTagPrefix, material) => { + makeToolRecipe(toolType, headTagPrefix, material) + } + + const processToolAxe = (toolType, headTagPrefix, material) => { + makeToolRecipe(toolType, headTagPrefix, material) + } + + const processToolShovel = (toolType, headTagPrefix, material) => { + makeToolRecipe(toolType, headTagPrefix, material) + } + + const processToolHoe = (toolType, headTagPrefix, material) => { + makeToolRecipe(toolType, headTagPrefix, material) + } + + const processToolKnife = (toolType, headTagPrefix, material) => { + makeToolRecipe(toolType, headTagPrefix, material) + } + + const processToolFile = (toolType, headTagPrefix, material) => { + makeToolRecipe(toolType, headTagPrefix, material) + } + + const processToolSaw = (toolType, headTagPrefix, material) => { + makeToolRecipe(toolType, headTagPrefix, material) + } + + const processToolSpade = (toolType, headTagPrefix, material) => { + makeToolRecipe(toolType, headTagPrefix, material) + } + + const processToolMiningHammer = (toolType, headTagPrefix, material) => { + makeToolRecipe(toolType, headTagPrefix, material) + } + + const processToolScythe = (toolType, headTagPrefix, material) => { + makeToolRecipe(toolType, headTagPrefix, material) + } + + const processToolHammer = (toolType, headTagPrefix, material) => { + makeToolRecipe(toolType, headTagPrefix, material) + } + + const processToolButcheryKnife = (toolType, headTagPrefix, material) => { + makeToolRecipe(toolType, headTagPrefix, material) + } + + const processToolMortar = (toolType, material) => { + const toolItem = ToolHelper.get(toolType, material) + if (toolItem.isEmpty()) return + + const usableTagPrefix = material.hasProperty(PropertyKey.GEM) ? TagPrefix.gem : TagPrefix.ingot; + const usableItem = ChemicalHelper.get(usableTagPrefix, material, 1) + + if (usableItem.isEmpty()) return + + event.shaped(toolItem, [ + ' A ', + 'BAB', + 'BBB' + ], { + A: usableItem, + B: '#tfc:rock/raw', + }).id(`gtceu:shaped/mortar_${material.getName()}`) + } + + const processNugget = (tagPrefix, material) => { + if (material != TFGMaterials.Unknown) return + + const item = ChemicalHelper.get(tagPrefix, material, 1) + if (item.isEmpty()) return + + event.remove({ id: `gtceu:alloy_smelter/alloy_smelt_${material.getName()}_to_nugget` }) + event.remove({ id: `gtceu:fluid_solidifier/solidify_${material.getName()}_to_nugget` }) + } + + const processIngot = (tagPrefix, material) => { + const ingotItem = ChemicalHelper.get(tagPrefix, material, 1) + + if (material.hasFlag(MaterialFlags.GENERATE_PLATE) && material != GTMaterials.Wood && material != GTMaterials.TreatedWood && !material.hasProperty(PropertyKey.POLYMER)) + { + const plateStack = ChemicalHelper.get(TagPrefix.plate, material, 1) + const blockStack = ChemicalHelper.get(TagPrefix.block, material, 1) + + let matAmount = TagPrefix.block.getMaterialAmount(material) / GTValues.M; + + if (!plateStack.isEmpty()) { + + // Слиток -> Стержень + event.recipes.createPressing(plateStack.withChance(0.8), ingotItem) + .id(`tfg:pressing/${material.getName()}_plate`) + + if (!blockStack.isEmpty()) { + + // 9х Слиток -> Блок + event.recipes.createCompacting(blockStack, ingotItem.withCount(matAmount)) + .heated() + .id(`tfg:compacting/${material.getName()}_block`) + } + } + else + { + if (!blockStack.isEmpty()) { + + // Блок из гемов -> 9 Пластин + event.recipes.createCutting(plateStack.withCount(matAmount).withChance(0.65), blockStack) + .id(`tfg:cutting/${material.getName()}_plate`) + } + + } + + } + + + } + + const processPlate = (tagPrefix, material) => { + const item = ChemicalHelper.get(tagPrefix, material, 1) + if (item.isEmpty()) return + + event.remove({ id: `gtceu:shaped/plate_${material.getName()}` }) + } + + const processPlateDouble = (tagPrefix, material) => { + const item = ChemicalHelper.get(tagPrefix, material, 1) + if (item.isEmpty()) return + + event.remove({ id: `gtceu:shaped/plate_double_${material.getName()}` }) + } + + const processBlock = (tagPrefix, material) => { + const item = ChemicalHelper.get(tagPrefix, material, 1) + if (item.isEmpty()) return + + event.remove({ id: `gtceu:compressor/compress_${material.getName()}_to_block` }) + } + + const processRod = (tagPrefix, material) => { + const rodItem = ChemicalHelper.get(tagPrefix, material, 1) + if (rodItem.isEmpty()) return + + const ingotItem = ChemicalHelper.get(tagPrefix, material, 1) + if (ingotItem.isEmpty()) return + + if (!material.hasFlag(MaterialFlags.GENERATE_ROD) || material == GTMaterials.Wood) return + if (ingotItem.isEmpty() || rodItem.isEmpty()) return + + // Прокатка стержней + event.custom({ + type: "createaddition:rolling", + input: ingotItem.toJson(), + result: rodItem.toJson() + }).id(`tfg:rolling/${material.getName()}_rod`) + } + + const processRodLong = (tagPrefix, material) => { + const item = ChemicalHelper.get(tagPrefix, material, 1) + if (item.isEmpty()) return + + event.remove({ id: `gtceu:shaped/stick_long_stick_${material.getName()}` }) + } + + const processPoorRawOre = (tagPrefix, material) => { + const poorOreItem = ChemicalHelper.get(tagPrefix, material, 1) + if (poorOreItem.isEmpty()) return + + const crushedOreItem = ChemicalHelper.get(TagPrefix.crushed, material, 1) + if (crushedOreItem.isEmpty()) return + + // Бедная сырая руда -> Дробленная руда (75%) + event.recipes.createCrushing([crushedOreItem.withChance(0.75)], poorOreItem) + .processingTime(200) + .id(`tfg:crushing/${material.getName()}_crushed_ore_from_poor_raw_ore`) + } + + const processNormalRawOre = (tagPrefix, material) => { + const normalOreItem = ChemicalHelper.get(tagPrefix, material, 1) + if (normalOreItem.isEmpty()) return + + const crushedOreItem = ChemicalHelper.get(TagPrefix.crushed, material, 1) + if (crushedOreItem.isEmpty()) return + + // Нормальная сырая руда -> Дробленная руда + Дробленная руда (20%) + event.recipes.createCrushing([crushedOreItem, crushedOreItem.withChance(0.2)], normalOreItem) + .processingTime(200) + .id(`tfg:crushing/${material.getName()}_crushed_ore_from_normal_raw_ore`) + } + + const processRichRawOre = (tagPrefix, material) => { + const richOreItem = ChemicalHelper.get(tagPrefix, material, 1) + if (richOreItem.isEmpty()) return + + const crushedOreItem = ChemicalHelper.get(TagPrefix.crushed, material, 1) + if (crushedOreItem.isEmpty()) return + + // Богатая сырая руда -> Дробленная руда + Дробленная руда (20%) + event.recipes.createCrushing([crushedOreItem, crushedOreItem, crushedOreItem.withChance(0.2)], richOreItem) + .processingTime(200) + .id(`tfg:crushing/${material.getName()}_crushed_ore_from_rich_raw_ore`) + } + + const processCrushedDust = (tagPrefix, material) => { + const crushedDustItem = ChemicalHelper.get(tagPrefix, material, 1) + if (crushedDustItem.isEmpty()) return + + const pureDustItem = ChemicalHelper.get(TagPrefix.dustPure, material, 1) + if (pureDustItem.isEmpty()) return + + // Дробленная руда -> Очищенная руда (90%) + event.recipes.createSplashing(pureDustItem.withChance(0.9), crushedDustItem) + .id(`tfg:splashing/${material.getName()}_purified_ore`) + + // Дробленная руда -> Очищенная руда + event.custom({ + type: "ae2:transform", + circumstance: { + type: "fluid", + tag: "tfc:water" + }, + ingredients: [ + crushedDustItem.toJson() + ], + result: pureDustItem.toJson() + }).id(`tfg:ae_transform/${material.getName()}_purified_ore`) + } + + const processImpureDust = (tagPrefix, material) => { + const impureDustItem = ChemicalHelper.get(tagPrefix, material, 1) + if (impureDustItem.isEmpty()) return + + const dustItem = ChemicalHelper.get(TagPrefix.dust, material, 1) + if (dustItem.isEmpty()) return + + // Грязная пыль -> Пыль (90%) + event.recipes.createSplashing(dustItem.withChance(0.9), impureDustItem) + .id(`tfg:splashing/${material.getName()}_dust_from_impure`) + + // Грязная пыль -> Пыль + event.custom({ + type: "ae2:transform", + circumstance: { + type: "fluid", + tag: "tfc:water" + }, + ingredients: [ + impureDustItem.toJson() + ], + result: dustItem.toJson() + }).id(`tfg:ae_transform/${material.getName()}_dust_from_impure`) + } + + const processPureDust = (tagPrefix, material) => { + const pureDust = ChemicalHelper.get(tagPrefix, material, 1) + if (pureDust.isEmpty()) return + + const dustItem = ChemicalHelper.get(TagPrefix.dust, material, 1) + if (dustItem.isEmpty()) return + + // Очищенная пыль -> Пыль (90%) + event.recipes.createSplashing(dustItem.withChance(0.9), pureDust) + .id(`tfg:splashing/${material.getName()}_dust_from_pure`) + + // Очищенная пыль -> Пыль + event.custom({ + type: "ae2:transform", + circumstance: { + type: "fluid", + tag: "tfc:water" + }, + ingredients: [ + pureDust.toJson() + ], + result: dustItem.toJson() + }).id(`tfg:ae_transform/${material.getName()}_dust_from_pure`) + } + + const processDust = (tagPrefix, material) => { + const dustItem = ChemicalHelper.get(tagPrefix, material, 1) + if (dustItem.isEmpty()) return + + const ingotItem = ChemicalHelper.get(TagPrefix.ingot, material, 1) + const gemItem = ChemicalHelper.get(TagPrefix.gem, material, 1) + + if (!ingotItem.isEmpty()) { + event.recipes.createCrushing(dustItem, ingotItem) + .processingTime(250) + .id(`tfg:crushing/${material.getName()}_dust`) + } + + if (!gemItem.isEmpty()) { + event.recipes.createMilling(dustItem, gemItem) + .processingTime(200) + .id(`tfg:milling/${material.getName()}_dust`) + } + } + + GTMaterialRegistry.getRegisteredMaterials().forEach(material => { + const toolProperty = material.getProperty(PropertyKey.TOOL) + const ingotProperty = material.getProperty(PropertyKey.INGOT) + const oreProperty = material.getProperty(PropertyKey.ORE) + + if (toolProperty != null) { + processToolSword(GTToolType.SWORD, TFGTagPrefix.toolHeadSword, material) + processToolPickaxe(GTToolType.PICKAXE, TFGTagPrefix.toolHeadPickaxe, material) + processToolAxe(GTToolType.AXE, TFGTagPrefix.toolHeadAxe, material) + processToolShovel(GTToolType.SHOVEL, TFGTagPrefix.toolHeadShovel, material) + processToolHoe(GTToolType.HOE, TFGTagPrefix.toolHeadHoe, material) + processToolKnife(GTToolType.KNIFE, TFGTagPrefix.toolHeadKnife, material) + processToolFile(GTToolType.FILE, TFGTagPrefix.toolHeadFile, material) + processToolSaw(GTToolType.SAW, TFGTagPrefix.toolHeadSaw, material) + processToolSpade(GTToolType.SPADE, TFGTagPrefix.toolHeadSpade, material) + processToolMiningHammer(GTToolType.MINING_HAMMER, TFGTagPrefix.toolHeadMiningHammer, material) + processToolScythe(GTToolType.SCYTHE, TFGTagPrefix.toolHeadScythe, material) + processToolHammer(GTToolType.HARD_HAMMER, TFGTagPrefix.toolHeadHammer, material) + processToolButcheryKnife(GTToolType.BUTCHERY_KNIFE, TFGTagPrefix.toolHeadButcheryKnife, material) + processToolMortar(GTToolType.MORTAR, material) + } + + if (ingotProperty != null) { + processNugget(TagPrefix.nugget, material) + processIngot(TagPrefix.ingot, material) + processPlate(TagPrefix.plate, material) + processPlateDouble(TagPrefix.plateDouble, material) + processBlock(TagPrefix.block, material) + processRod(TagPrefix.rod, material) + processRodLong(TagPrefix.rodLong, material) + } + + if (oreProperty != null) { + processPoorRawOre(TFGTagPrefix.poorRawOre, material) + processNormalRawOre(TagPrefix.rawOre, material) + processRichRawOre(TFGTagPrefix.richRawOre, material) + + processCrushedDust(TagPrefix.crushed, material) + processImpureDust(TagPrefix.dustImpure, material) + processPureDust(TagPrefix.dustPure, material) + processDust(TagPrefix.dust, material) + } + + }) + //#endregion + + //#region Раскрафт камня стоунтайпов + // Gabbro + event.recipes.gtceu.centrifuge(`tfg:gabbro_dust_separation`) + .itemInputs('tfg:gabbro_dust') + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Titanium, 6700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Iron, 3700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.MetalMixture, 1700, 700) + .EUt(GTValues.VA[GTValues.MV]).duration(480) + + // Shale + event.recipes.gtceu.centrifuge(`tfg:shale_dust_separation`) + .itemInputs('tfg:shale_dust') + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Sodium, 7500, 500) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.MetalMixture, 1500, 500) + .outputFluids(Fluid.of(GTMaterials.Oxygen.getFluid(), 16)) + .EUt(GTValues.VA[GTValues.MV]).duration(480) + + // Claystone + event.recipes.gtceu.centrifuge(`tfg:claystone_dust_separation`) + .itemInputs('tfg:claystone_dust') + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Aluminium, 6700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Silicon, 6700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Hematite, 6700, 700) + .outputFluids(Fluid.of(GTMaterials.Oxygen.getFluid(), 5)) + .EUt(GTValues.VA[GTValues.MV]).duration(480) + + // Limestone + event.recipes.gtceu.centrifuge(`tfg:limestone_dust_separation`) + .itemInputs('tfg:limestone_dust') + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Calcium, 8700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.MetalMixture, 1700, 700) + .outputFluids(Fluid.of(GTMaterials.Oxygen.getFluid(), 36)) + .EUt(GTValues.VA[GTValues.MV]).duration(480) + + // Conglomerate + event.recipes.gtceu.centrifuge(`tfg:conglomerate_dust_separation`) + .itemInputs('tfg:conglomerate_dust') + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Hematite, 6700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Silicon, 4700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.TricalciumPhosphate, 3700, 700) + .outputFluids(Fluid.of(GTMaterials.Oxygen.getFluid(), 5)) + .EUt(GTValues.VA[GTValues.MV]).duration(480) + + // Dolomite + event.recipes.gtceu.centrifuge(`tfg:dolomite_dust_separation`) + .itemInputs('tfg:dolomite_dust') + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Magnesium, 6700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Calcium, 5700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.MetalMixture, 3700, 700) + .outputFluids(Fluid.of(GTMaterials.Oxygen.getFluid(), 16)) + .EUt(GTValues.VA[GTValues.MV]).duration(480) + + // Chert + event.recipes.gtceu.centrifuge(`tfg:chert_dust_separation`) + .itemInputs('tfg:chert_dust') + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Silicon, 6700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.MetalMixture, 5700, 700) + .outputFluids(Fluid.of(GTMaterials.Oxygen.getFluid(), 24)) + .EUt(GTValues.VA[GTValues.MV]).duration(480) + + // Chalk + event.recipes.gtceu.centrifuge(`tfg:chalk_dust_separation`) + .itemInputs('tfg:chalk_dust') + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Calcium, 6700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Carbon, 3700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.MetalMixture, 1700, 700) + .outputFluids(Fluid.of(GTMaterials.Oxygen.getFluid(), 12)) + .EUt(GTValues.VA[GTValues.MV]).duration(480) + + // Rhyolite + event.recipes.gtceu.centrifuge(`tfg:rhyolite_dust_separation`) + .itemInputs('tfg:rhyolite_dust') + .chancedOutput(TagPrefix.dustTiny, GTMaterials.SiliconDioxide, 8700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.MetalMixture, 800, 700) + .EUt(GTValues.VA[GTValues.MV]).duration(480) + + // Dacite + event.recipes.gtceu.centrifuge(`tfg:dacite_dust_separation`) + .itemInputs('tfg:dacite_dust') + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Sodium, 6700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Calcium, 5700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.SiliconDioxide, 4700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Aluminium, 3700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.MetalMixture, 150, 700) + .outputFluids(Fluid.of(GTMaterials.Oxygen.getFluid(), 12)) + .EUt(GTValues.VA[GTValues.MV]).duration(480) + + // Slate + event.recipes.gtceu.centrifuge(`tfg:slate_dust_separation`) + .itemInputs('tfg:slate_dust') + .chancedOutput(TagPrefix.dustTiny, GTMaterials.MetalMixture, 780, 480) + .outputFluids(Fluid.of(GTMaterials.Oxygen.getFluid(), 6)) + .EUt(GTValues.VA[GTValues.MV]).duration(480) + + // Phyllite + event.recipes.gtceu.centrifuge(`tfg:phyllite_dust_separation`) + .itemInputs('tfg:phyllite_dust') + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Quartzite, 5700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.CalciumChloride, 1700, 700) + .outputFluids(Fluid.of(GTMaterials.Oxygen.getFluid(), 2)) + .EUt(GTValues.VA[GTValues.MV]).duration(480) + + // Schist + event.recipes.gtceu.centrifuge(`tfg:schist_dust_separation`) + .itemInputs('tfg:schist_dust') + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Mica, 6700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Talc, 5700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Graphite, 4700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.MetalMixture, 780, 700) + .outputFluids(Fluid.of(GTMaterials.Oxygen.getFluid(), 12)) + .EUt(GTValues.VA[GTValues.MV]).duration(480) + + // Gneiss + event.recipes.gtceu.centrifuge(`tfg:gneiss_dust_separation`) + .itemInputs('tfg:gneiss_dust') + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Quartzite, 6700, 700) + .chancedOutput(TagPrefix.dustTiny, GTMaterials.Biotite, 3700, 700) + .outputFluids(Fluid.of(GTMaterials.Oxygen.getFluid(), 2)) + .EUt(GTValues.VA[GTValues.MV]).duration(480) + //#endregion + + //#region Молды крафты, дубляжи + + // private static void registerExtruderMoldRecipes(Consumer provider) { + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_extruder_mining_hammer_head"), + // SHAPE_EXTRUDER_MINING_HAMMER_HEAD.asStack(), + // "Sfh", " ", " ", 'S', SHAPE_EMPTY.asStack()); + // + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_extruder_sword_head"), + // SHAPE_EXTRUDER_SWORD_HEAD.asStack(), + // "Shf", " ", " ", 'S', SHAPE_EMPTY.asStack()); + // + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_extruder_pickaxe_head"), + // SHAPE_EXTRUDER_PICKAXE_HEAD.asStack(), + // "S ", "hf ", " ", 'S', SHAPE_EMPTY.asStack()); + // + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_extruder_axe_head"), + // SHAPE_EXTRUDER_AXE_HEAD.asStack(), + // "S ", " fh", " ", 'S', SHAPE_EMPTY.asStack()); + // + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_extruder_hoe_head"), + // SHAPE_EXTRUDER_HOE_HEAD.asStack(), + // "S ", " hf", " ", 'S', SHAPE_EMPTY.asStack()); + // + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_extruder_scythe_head"), + // SHAPE_EXTRUDER_SCYTHE_HEAD.asStack(), + // "S ", " ", "fh ", 'S', SHAPE_EMPTY.asStack()); + // + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_extruder_file_head"), + // SHAPE_EXTRUDER_FILE_HEAD.asStack(), + // "S ", " ", "hf ", 'S', SHAPE_EMPTY.asStack()); + // + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_extruder_hammer_head"), + // SHAPE_EXTRUDER_HAMMER_HEAD.asStack(), + // "Sf ", " h ", " ", 'S', SHAPE_EMPTY.asStack()); + // + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_extruder_saw_head"), + // SHAPE_EXTRUDER_SAW_HEAD.asStack(), + // "Sh ", " f ", " ", 'S', SHAPE_EMPTY.asStack()); + // + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_extruder_knife_head"), + // SHAPE_EXTRUDER_KNIFE_HEAD.asStack(), + // "S f", " ", " h", 'S', SHAPE_EMPTY.asStack()); + // + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_extruder_butchery_head_head"), + // SHAPE_EXTRUDER_BUTCHERY_KNIFE_HEAD.asStack(), + // "S h", " ", " f", 'S', SHAPE_EMPTY.asStack()); + // + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_extruder_shovel_head"), + // SHAPE_EXTRUDER_SHOVEL_HEAD.asStack(), + // "S ", "f ", "h ", 'S', SHAPE_EMPTY.asStack()); + // + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_extruder_spade_head"), + // SHAPE_EXTRUDER_SPADE_HEAD.asStack(), + // "S ", "f ", " h", 'S', SHAPE_EMPTY.asStack()); + // + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_extruder_propick_head"), + // SHAPE_EXTRUDER_PROPICK_HEAD.asStack(), + // "Sxf", " ", " ", 'S', SHAPE_EMPTY.asStack()); + // + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_extruder_javelin_head"), + // SHAPE_EXTRUDER_JAVELIN_HEAD.asStack(), + // "S x", "f ", " ", 'S', SHAPE_EMPTY.asStack()); + // + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_extruder_chisel_head"), + // SHAPE_EXTRUDER_CHISEL_HEAD.asStack(), + // "S ", "xf ", " ", 'S', SHAPE_EMPTY.asStack()); + // + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_extruder_mace_head"), + // SHAPE_EXTRUDER_MACE_HEAD.asStack(), + // "S ", " xf", " ", 'S', SHAPE_EMPTY.asStack()); + // } + + // private static void registerCastingMoldRecipes(Consumer provider) { + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_mold_unfinished_lamp"), + // SHAPE_MOLD_UNFINISHED_LAMP.asStack(), + // "Sh ", " ", " ", 'S', SHAPE_EMPTY.asStack()); + // + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_mold_trapdoor"), + // SHAPE_MOLD_TRAPDOOR.asStack(), + // "S h", " ", " ", 'S', SHAPE_EMPTY.asStack()); + // + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_mold_chain"), + // SHAPE_MOLD_CHAIN.asStack(), + // "S ", "h ", " ", 'S', SHAPE_EMPTY.asStack()); + // + // VanillaRecipeHelper.addStrictShapedRecipe(provider, + // TFGCore.id("shape_mold_bell"), + // SHAPE_MOLD_BELL.asStack(), + // "S ", " h ", " ", 'S', SHAPE_EMPTY.asStack()); + // } + + //#endregion + + //#region оставшееся под разобрать + + // private static void registerExtruderMoldCopyingRecipes(Consumer provider) { + // for (var shapeMold : TFGItems.SHAPE_EXTRUDERS) { + // FORMING_PRESS_RECIPES.recipeBuilder(TFGCore.id("copy_mold_" + shapeMold.get())) + // .duration(120).EUt(22) + // .notConsumable(shapeMold) + // .inputItems(SHAPE_EMPTY) + // .outputItems(shapeMold) + // .save(provider); + // } + // } + + // private static void registerCastingMoldCopyingRecipes(Consumer provider) { + // for (var shapeMold : TFGItems.SHAPE_MOLDS) { + // FORMING_PRESS_RECIPES.recipeBuilder(TFGCore.id("copy_mold_" + shapeMold.get() + "_casting_mold")) + // .duration(120).EUt(22) + // .notConsumable(shapeMold) + // .inputItems(SHAPE_EMPTY) + // .outputItems(shapeMold) + // .save(provider); + // } + // } + + + // private static void processDoubleIngot(TagPrefix prefix, Material material, TFCProperty property, Consumer provider) { + // var ingotStack = ChemicalHelper.get(ingot, material); + // var doubleIngotStack = ChemicalHelper.get(prefix, material); + // + // EXTRACTOR_RECIPES.recipeBuilder(TFGCore.id("extract_" + material.getName() + "_double_ingot")) + // .EUt(VA[ULV]).duration((int) material.getMass()) + // .inputItems(doubleIngotStack) + // .outputFluids(material.getFluid(288)) + // .save(provider); + // + // MACERATOR_RECIPES.recipeBuilder(TFGCore.id("macerate_" + material.getName() + "_double_ingot")) + // .EUt(VA[ULV]).duration((int) material.getMass()) + // .inputItems(doubleIngotStack) + // .outputItems(dust, material, 2) + // .save(provider); + // } + + + // private static void processToolHead(TagPrefix prefix, Material material, ItemEntry extruderShape, int circuitValue, Consumer consumer) { + // var output = ChemicalHelper.get(prefix, material); + // if (output.isEmpty()) return; + // + // if (material.hasProperty(PropertyKey.INGOT)) { + // EXTRUDER_RECIPES.recipeBuilder(TFGCore.id("extrude_" + material.getName() + "_ingot_to_" + prefix.name().toLowerCase() + "_head")) + // .duration(12).EUt(32) + // .notConsumable(extruderShape) + // .inputItems(ingot, material, (int) (prefix.materialAmount() / GTValues.M)) + // .outputItems(output) + // .save(consumer); + // } else if (material.hasProperty(PropertyKey.GEM)) { + // LASER_ENGRAVER_RECIPES.recipeBuilder(TFGCore.id("engrave_" + material.getName() + "_gem_to_" + prefix.name().toLowerCase() + "_head")) + // .duration(12).EUt(32) + // .circuitMeta(circuitValue) + // .notConsumable(ChemicalHelper.get(TagPrefix.lens, Glass)) + // .inputItems(gem, material, (int) (prefix.materialAmount() / GTValues.M)) + // .outputItems(output) + // .save(consumer); + // } + // } + + + //#endregion + //#region Рецепты электрического генератора //todo: nerf @@ -1288,780 +1957,4 @@ const registerGregTechRecipes1 = (event) => { .itemOutputs('gtceu:sticky_resin') .duration(480) .EUt(7) - - - //#region Рецепты, которые итерируются по всем материалам - - GTMaterialRegistry.getRegisteredMaterials().forEach(material => { - //#region Рецепты инструментов - - if (material.hasFlag(TFGMaterialFlags.HAS_TFC_TOOL)) { - global.GTCEU_ANVIL_TOOL_TYPES.forEach(toolType => { - let toolStack = ToolHelper.get(toolType, material) - - event.recipes.tfc.advanced_shaped_crafting(TFC.itemStackProvider.of(toolStack).copyForgingBonus(), [ - 'A', - 'B' - ], { - A: `gtceu:${material.getName()}_${toolType.name}_head`, - B: '#forge:rods/wooden' - }, 0, 0).id(`gtceu:shaped/${toolType.name}_${material.getName()}`) - - }) - } - - //#endregion - - if (material.hasProperty(PropertyKey.ORE)) - { - let poorRawStack = ChemicalHelper.get(TFGTagPrefix.poorRawOre, material, 1) - let normalRawStack = ChemicalHelper.get(TagPrefix.rawOre, material, 1) - let richRawStack = ChemicalHelper.get(TFGTagPrefix.richRawOre, material, 1) - - let crushedOreStack = ChemicalHelper.get(TagPrefix.crushed, material, 1) - let purifiedOreStack = ChemicalHelper.get(TagPrefix.crushedPurified, material, 1) - let impureDustStack = ChemicalHelper.get(TagPrefix.dustImpure, material, 1) - let pureDustStack = ChemicalHelper.get(TagPrefix.dustPure, material, 1) - let dustStack = ChemicalHelper.get(TagPrefix.dust, material, 1) - - // Бедная сырая руда -> Дробленная руда + Дробленная руда (30%) - event.recipes.createCrushing(crushedOreStack.withChance(0.75), poorRawStack) - .processingTime(200) - .id(`tfg:crushing/${material.getName()}_crushed_ore_from_poor_raw_ore`) - - // Нормальная сырая руда -> Дробленная руда + Дробленная руда (30%) - event.recipes.createCrushing([crushedOreStack, crushedOreStack.withChance(0.2)], normalRawStack) - .processingTime(200) - .id(`tfg:crushing/${material.getName()}_crushed_ore_from_normal_raw_ore`) - - // Богатая сырая руда -> Дробленная руда + Дробленная руда (30%) - event.recipes.createCrushing([crushedOreStack, crushedOreStack, crushedOreStack.withChance(0.2)], richRawStack) - .processingTime(200) - .id(`tfg:crushing/${material.getName()}_crushed_ore_from_rich_raw_ore`) - - // Грязная пыль -> Пыль (90%) - event.recipes.createSplashing(dustStack.withChance(0.9), impureDustStack) - .id(`tfg:splashing/${material.getName()}_dust_from_impure`) - - // Очищенная пыль -> Пыль (90%) - event.recipes.createSplashing(dustStack.withChance(0.9), pureDustStack) - .id(`tfg:splashing/${material.getName()}_dust_from_pure`) - - // Дробленная руда -> Очищенная руда (90%) - event.recipes.createSplashing(purifiedOreStack.withChance(0.9), crushedOreStack) - .id(`tfg:splashing/${material.getName()}_purified_ore`) - - // Грязная пыль -> Пыль - event.custom({ - type: "ae2:transform", - circumstance: { - type: "fluid", - tag: "minecraft:water" - }, - ingredients: [ - impureDustStack.toJson() - ], - result: dustStack.toJson() - }).id(`tfg:ae_transform/${material.getName()}_dust_from_impure`) - - // Очищенная пыль -> Пыль - event.custom({ - type: "ae2:transform", - circumstance: { - type: "fluid", - tag: "minecraft:water" - }, - ingredients: [ - pureDustStack.toJson() - ], - result: dustStack.toJson() - }).id(`tfg:ae_transform/${material.getName()}_dust_from_pure`) - - // Дробленная руда -> Очищенная руда - event.custom({ - type: "ae2:transform", - circumstance: { - type: "fluid", - tag: "minecraft:water" - }, - ingredients: [ - crushedOreStack.toJson() - ], - result: purifiedOreStack.toJson() - }).id(`tfg:ae_transform/${material.getName()}_purified_ore`) - } - - let ingotStack = ChemicalHelper.get(TagPrefix.ingot, material, 1) - - if (material.hasFlag(MaterialFlags.GENERATE_PLATE) && material != GTMaterials.Wood && material != GTMaterials.TreatedWood && !material.hasProperty(PropertyKey.POLYMER)) - { - let plateStack = ChemicalHelper.get(TagPrefix.plate, material, 1) - let blockStack = ChemicalHelper.get(TagPrefix.block, material, 1) - - let matAmount = TagPrefix.block.getMaterialAmount(material) / GTValues.M; - - if (material.hasProperty(PropertyKey.INGOT)) - { - if (!plateStack.isEmpty()) { - // Слиток -> Стержень - event.recipes.createPressing(plateStack.withChance(0.8), ingotStack) - .id(`tfg:pressing/${material.getName()}_plate`) - - if (!blockStack.isEmpty()) { - // 9х Слиток -> Блок - event.recipes.createCompacting(blockStack, ingotStack.withCount(matAmount)) - .heated() - .id(`tfg:compacting/${material.getName()}_block`) - } - } - - - } - else - { - if (!blockStack.isEmpty()) { - // Блок из гемов -> 9 Пластин - event.recipes.createCutting(Item.of(plateStack.withCount(matAmount)).withChance(0.65), `#forge:storage_blocks/${material.getName()}`) - .id(`tfg:cutting/${material.getName()}_plate`) - } - - } - } - - // Прокатка стержней - if (material.hasFlag(MaterialFlags.GENERATE_ROD) && material != GTMaterials.Wood) - { - let rodStack = ChemicalHelper.get(TagPrefix.rod, material, 2) - - if (!ingotStack.isEmpty() && !rodStack.isEmpty()) { - - event.custom({ - type: "createaddition:rolling", - input: ingotStack.toJson(), - result: rodStack.toJson() - }).id(`tfg:rolling/${material.getName()}_rod`) - - } - - - } - - - let gemStack = ChemicalHelper.get(TagPrefix.gem, material, 1) - let dustStack = ChemicalHelper.get(TagPrefix.dust, material, 1) - - if (!dustStack.isEmpty()) { - - if (!ingotStack.isEmpty()) { - event.recipes.createCrushing(dustStack, ingotStack) - .processingTime(250) - .id(`tfg:crushing/${material.getName()}_dust`) - } - - if (!gemStack.isEmpty()) { - event.recipes.createMilling(dustStack, gemStack) - .processingTime(200) - .id(`tfg:milling/${material.getName()}_dust`) - } - - } - - }); - - //#endregion -} - - - - - - -// /** -// * Отключение рецепта генерации nugget'ов из слитков, если nugget'а нет. -// */ -// @Redirect(method = "processIngot", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/builder/GTRecipeBuilder;save(Ljava/util/function/Consumer;)V", ordinal = 3), remap = false) -// private static void tfg$processIngot$gtRecipeBuilder$save$nugget(GTRecipeBuilder instance, Consumer consumer, TagPrefix ingotPrefix, Material material, IngotProperty property) { -// if (!ChemicalHelper.get(TagPrefix.nugget, material).isEmpty()) { -// instance.save(consumer); -// } -// } -// -// /** -// * В GT при добавлении предмета в output или input сразу проверяется empty ли он, -// * чтобы отключить рецепт не хватит просто его не сохранять в некоторых случаях. -// * Если output'а или input'а нет, то нужно будет еще задать условие и какой-то предмет который существует, -// * собственно это мы тут и делаем. -// */ -// @Redirect(method = "processIngot", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/builder/GTRecipeBuilder;outputItems(Lcom/gregtechceu/gtceu/api/data/tag/TagPrefix;Lcom/gregtechceu/gtceu/api/data/chemical/material/Material;I)Lcom/gregtechceu/gtceu/data/recipe/builder/GTRecipeBuilder;", ordinal = 1), remap = false) -// private static GTRecipeBuilder tfg$processIngot$gtRecipeBuilder$outputItems(GTRecipeBuilder instance, TagPrefix orePrefix, Material material, int count) { -// if (!ChemicalHelper.get(TagPrefix.nugget, material).isEmpty()) { -// instance.outputItems(TagPrefix.nugget, material, 9); -// } -// return instance; -// } -// -// /** -// * Отключение генерации рецептов: 2 слитка + молот = пластина (верстак). -// * */ -// @Redirect(method = "processIngot", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/VanillaRecipeHelper;addShapedRecipe(Ljava/util/function/Consumer;Ljava/lang/String;Lnet/minecraft/world/item/ItemStack;[Ljava/lang/Object;)V", ordinal = 2), remap = false) -// private static void tfg$processIngot$addShapedRecipe$plate(Consumer provider, String regName, ItemStack result, Object[] recipe) {} -// -// /** -// * Отключение генерации рецептов: 9 слитков -> блок. (Компрессор) -// */ -// @Redirect(method = "processIngot", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/builder/GTRecipeBuilder;save(Ljava/util/function/Consumer;)V", ordinal = 5), remap = false) -// private static void tfg$processIngot$gtRecipeBuilder$save$block(GTRecipeBuilder instance, Consumer consumer) {} - -// /** -// * Отключение генерации рецептов: 2 пластины + молот = двойная пластина (верстак). -// * */ -// @Redirect(method = "processPlateDouble", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/VanillaRecipeHelper;addShapedRecipe(Ljava/util/function/Consumer;Ljava/lang/String;Lnet/minecraft/world/item/ItemStack;[Ljava/lang/Object;)V"), remap = false) -// private static void tfg$processPlateDouble$vanillaRecipeHelper$addShapedRecipe$doublePlate(Consumer provider, String regName, ItemStack result, Object[] recipe) {} -// -// /** -// * Отключение генерации рецептов: 2 стержня + молот = длинный стержень (верстак). -// * */ -// @Redirect(method = "processLongStick", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/VanillaRecipeHelper;addShapedRecipe(Ljava/util/function/Consumer;Ljava/lang/String;Lnet/minecraft/world/item/ItemStack;[Ljava/lang/Object;)V", ordinal = 3), remap = false) -// private static void tfg$processLongStick$vanillaRecipeHelper$addShapedRecipe$longStick(Consumer provider, String regName, ItemStack result, Object[] recipe) {} - -//public static void init(Consumer provider) { - // registerTFCRockDecompositionRecipes(provider); - // registerExtruderMoldRecipes(provider); - // registerCastingMoldRecipes(provider); - // registerExtruderMoldCopyingRecipes(provider); - // registerCastingMoldCopyingRecipes(provider); - // registerProcessingToolHeadsRecipes(provider); - // registerTagPrefixHandlerRecipes(provider); - // } - - // private static void registerTFCRockDecompositionRecipes(Consumer provider) { - // // Gabbro - // CENTRIFUGE_RECIPES.recipeBuilder(TFGCore.id("gabbro_dust_separation")) - // .EUt(VA[MV]).duration(480) - // .inputItems(dust, Gabbro) - // .chancedOutput(dustTiny, Titanium, 6700, 700) - // .chancedOutput(dustTiny, Iron, 3700, 700) - // .chancedOutput(dustTiny, MetalMixture, 1700, 700) - // .save(provider); - // - // // Shale - // CENTRIFUGE_RECIPES.recipeBuilder(TFGCore.id("shale_dust_separation")) - // .EUt(VA[MV]).duration(480) - // .inputItems(dust, Shale) - // .chancedOutput(dustTiny, Sodium, 7500, 500) - // .chancedOutput(dustTiny, MetalMixture, 1500, 500) - // .outputFluids(Oxygen.getFluid(16)) - // .save(provider); - // - // // Claystone - // CENTRIFUGE_RECIPES.recipeBuilder(TFGCore.id("claystone_dust_separation")) - // .duration(480).EUt(VA[MV]) - // .inputItems(dust, Claystone) - // .chancedOutput(dustTiny, Aluminium, 6700, 700) - // .chancedOutput(dustTiny, Silicon, 6700, 700) - // .chancedOutput(dustTiny, Hematite, 6700, 700) - // .outputFluids(Oxygen.getFluid(5)) - // .save(provider); - // - // // Limestone - // CENTRIFUGE_RECIPES.recipeBuilder(TFGCore.id("limestone_dust_separation")) - // .duration(480).EUt(VA[MV]) - // .inputItems(dust, Limestone) - // .chancedOutput(dustTiny, Calcium, 8700, 700) - // .chancedOutput(dustTiny, MetalMixture, 1700, 700) - // .outputFluids(Oxygen.getFluid(36)) - // .save(provider); - // - // // Conglomerate - // CENTRIFUGE_RECIPES.recipeBuilder(TFGCore.id("conglomerate_dust_separation")) - // .duration(480).EUt(VA[MV]) - // .inputItems(dust, Conglomerate) - // .chancedOutput(dustTiny, Hematite, 6700, 700) - // .chancedOutput(dustTiny, Silicon, 4700, 700) - // .chancedOutput(dustTiny, TricalciumPhosphate, 3700, 700) - // .outputFluids(Oxygen.getFluid(5)) - // .save(provider); - // - // // Dolomite - // CENTRIFUGE_RECIPES.recipeBuilder(TFGCore.id("dolomite_dust_separation")) - // .duration(480).EUt(VA[MV]) - // .inputItems(dust, Dolomite) - // .chancedOutput(dustTiny, Magnesium, 6700, 700) - // .chancedOutput(dustTiny, Calcium, 5700, 700) - // .chancedOutput(dustTiny, MetalMixture, 3700, 700) - // .outputFluids(Oxygen.getFluid(16)) - // .save(provider); - // - // // Chert - // CENTRIFUGE_RECIPES.recipeBuilder(TFGCore.id("chert_dust_separation")) - // .duration(480).EUt(VA[MV]) - // .inputItems(dust, Chert) - // .chancedOutput(dustTiny, Silicon, 6700, 700) - // .chancedOutput(dustTiny, MetalMixture, 5700, 700) - // .outputFluids(Oxygen.getFluid(24)) - // .save(provider); - // - // // Chalk - // CENTRIFUGE_RECIPES.recipeBuilder(TFGCore.id("chalk_dust_separation")) - // .duration(480).EUt(VA[MV]) - // .inputItems(dust, Chalk) - // .chancedOutput(dustTiny, Calcium, 6700, 700) - // .chancedOutput(dustTiny, Carbon, 3700, 700) - // .chancedOutput(dustTiny, MetalMixture, 1700, 700) - // .outputFluids(Oxygen.getFluid(12)) - // .save(provider); - // - // // Rhyolite - // CENTRIFUGE_RECIPES.recipeBuilder(TFGCore.id("rhyolite_dust_separation")) - // .duration(480).EUt(VA[MV]) - // .inputItems(dust, Rhyolite) - // .chancedOutput(dustTiny, SiliconDioxide, 8700, 700) - // .chancedOutput(dustTiny, MetalMixture, 800, 700) - // .save(provider); - // - // // Dacite - // CENTRIFUGE_RECIPES.recipeBuilder(TFGCore.id("dacite_dust_separation")) - // .duration(480).EUt(VA[MV]) - // .inputItems(dust, Dacite) - // .chancedOutput(dustTiny, Sodium, 6700, 700) - // .chancedOutput(dustTiny, Calcium, 5700, 700) - // .chancedOutput(dustTiny, SiliconDioxide, 4700, 700) - // .chancedOutput(dustTiny, Aluminium, 3700, 700) - // .chancedOutput(dustTiny, MetalMixture, 150, 700) - // .outputFluids(Oxygen.getFluid(12)) - // .save(provider); - // - // // Slate - // CENTRIFUGE_RECIPES.recipeBuilder(TFGCore.id("slate_dust_separation")) - // .duration(480).EUt(VA[MV]) - // .inputItems(dust, Slate) - // .chancedOutput(dustTiny, MetalMixture, 780, 480) - // .outputFluids(Oxygen.getFluid(6)) - // .save(provider); - // - // // Phyllite - // CENTRIFUGE_RECIPES.recipeBuilder(TFGCore.id("phyllite_dust_separation")) - // .duration(480).EUt(VA[MV]) - // .inputItems(dust, Phyllite) - // .chancedOutput(dustTiny, Quartzite, 5700, 700) - // .chancedOutput(dustTiny, CalciumChloride, 1700, 700) - // .outputFluids(Oxygen.getFluid(2)) - // .save(provider); - // - // // Schist - // CENTRIFUGE_RECIPES.recipeBuilder(TFGCore.id("schist_dust_separation")) - // .duration(480).EUt(VA[MV]) - // .inputItems(dust, Schist) - // .chancedOutput(dustTiny, Mica, 6700, 700) - // .chancedOutput(dustTiny, Talc, 5700, 700) - // .chancedOutput(dustTiny, Graphite, 4700, 700) - // .chancedOutput(dustTiny, MetalMixture, 780, 700) - // .outputFluids(Oxygen.getFluid(12)) - // .save(provider); - // - // // Gneiss - // CENTRIFUGE_RECIPES.recipeBuilder(TFGCore.id("gneiss_dust_separation")) - // .duration(480).EUt(VA[MV]) - // .inputItems(dust, Gneiss) - // .chancedOutput(dustTiny, Quartzite, 6700, 700) - // .chancedOutput(dustTiny, Biotite, 3700, 700) - // .outputFluids(Oxygen.getFluid(2)) - // .save(provider); - // } - - // private static void registerExtruderMoldRecipes(Consumer provider) { - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_extruder_mining_hammer_head"), - // SHAPE_EXTRUDER_MINING_HAMMER_HEAD.asStack(), - // "Sfh", " ", " ", 'S', SHAPE_EMPTY.asStack()); - // - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_extruder_sword_head"), - // SHAPE_EXTRUDER_SWORD_HEAD.asStack(), - // "Shf", " ", " ", 'S', SHAPE_EMPTY.asStack()); - // - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_extruder_pickaxe_head"), - // SHAPE_EXTRUDER_PICKAXE_HEAD.asStack(), - // "S ", "hf ", " ", 'S', SHAPE_EMPTY.asStack()); - // - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_extruder_axe_head"), - // SHAPE_EXTRUDER_AXE_HEAD.asStack(), - // "S ", " fh", " ", 'S', SHAPE_EMPTY.asStack()); - // - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_extruder_hoe_head"), - // SHAPE_EXTRUDER_HOE_HEAD.asStack(), - // "S ", " hf", " ", 'S', SHAPE_EMPTY.asStack()); - // - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_extruder_scythe_head"), - // SHAPE_EXTRUDER_SCYTHE_HEAD.asStack(), - // "S ", " ", "fh ", 'S', SHAPE_EMPTY.asStack()); - // - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_extruder_file_head"), - // SHAPE_EXTRUDER_FILE_HEAD.asStack(), - // "S ", " ", "hf ", 'S', SHAPE_EMPTY.asStack()); - // - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_extruder_hammer_head"), - // SHAPE_EXTRUDER_HAMMER_HEAD.asStack(), - // "Sf ", " h ", " ", 'S', SHAPE_EMPTY.asStack()); - // - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_extruder_saw_head"), - // SHAPE_EXTRUDER_SAW_HEAD.asStack(), - // "Sh ", " f ", " ", 'S', SHAPE_EMPTY.asStack()); - // - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_extruder_knife_head"), - // SHAPE_EXTRUDER_KNIFE_HEAD.asStack(), - // "S f", " ", " h", 'S', SHAPE_EMPTY.asStack()); - // - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_extruder_butchery_head_head"), - // SHAPE_EXTRUDER_BUTCHERY_KNIFE_HEAD.asStack(), - // "S h", " ", " f", 'S', SHAPE_EMPTY.asStack()); - // - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_extruder_shovel_head"), - // SHAPE_EXTRUDER_SHOVEL_HEAD.asStack(), - // "S ", "f ", "h ", 'S', SHAPE_EMPTY.asStack()); - // - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_extruder_spade_head"), - // SHAPE_EXTRUDER_SPADE_HEAD.asStack(), - // "S ", "f ", " h", 'S', SHAPE_EMPTY.asStack()); - // - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_extruder_propick_head"), - // SHAPE_EXTRUDER_PROPICK_HEAD.asStack(), - // "Sxf", " ", " ", 'S', SHAPE_EMPTY.asStack()); - // - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_extruder_javelin_head"), - // SHAPE_EXTRUDER_JAVELIN_HEAD.asStack(), - // "S x", "f ", " ", 'S', SHAPE_EMPTY.asStack()); - // - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_extruder_chisel_head"), - // SHAPE_EXTRUDER_CHISEL_HEAD.asStack(), - // "S ", "xf ", " ", 'S', SHAPE_EMPTY.asStack()); - // - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_extruder_mace_head"), - // SHAPE_EXTRUDER_MACE_HEAD.asStack(), - // "S ", " xf", " ", 'S', SHAPE_EMPTY.asStack()); - // } - - // private static void registerCastingMoldRecipes(Consumer provider) { - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_mold_unfinished_lamp"), - // SHAPE_MOLD_UNFINISHED_LAMP.asStack(), - // "Sh ", " ", " ", 'S', SHAPE_EMPTY.asStack()); - // - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_mold_trapdoor"), - // SHAPE_MOLD_TRAPDOOR.asStack(), - // "S h", " ", " ", 'S', SHAPE_EMPTY.asStack()); - // - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_mold_chain"), - // SHAPE_MOLD_CHAIN.asStack(), - // "S ", "h ", " ", 'S', SHAPE_EMPTY.asStack()); - // - // VanillaRecipeHelper.addStrictShapedRecipe(provider, - // TFGCore.id("shape_mold_bell"), - // SHAPE_MOLD_BELL.asStack(), - // "S ", " h ", " ", 'S', SHAPE_EMPTY.asStack()); - // } - - // private static void registerExtruderMoldCopyingRecipes(Consumer provider) { - // for (var shapeMold : TFGItems.SHAPE_EXTRUDERS) { - // FORMING_PRESS_RECIPES.recipeBuilder(TFGCore.id("copy_mold_" + shapeMold.get())) - // .duration(120).EUt(22) - // .notConsumable(shapeMold) - // .inputItems(SHAPE_EMPTY) - // .outputItems(shapeMold) - // .save(provider); - // } - // } - - // private static void registerCastingMoldCopyingRecipes(Consumer provider) { - // for (var shapeMold : TFGItems.SHAPE_MOLDS) { - // FORMING_PRESS_RECIPES.recipeBuilder(TFGCore.id("copy_mold_" + shapeMold.get() + "_casting_mold")) - // .duration(120).EUt(22) - // .notConsumable(shapeMold) - // .inputItems(SHAPE_EMPTY) - // .outputItems(shapeMold) - // .save(provider); - // } - // } - - - - // private static void processDoubleIngot(TagPrefix prefix, Material material, TFCProperty property, Consumer provider) { - // var ingotStack = ChemicalHelper.get(ingot, material); - // var doubleIngotStack = ChemicalHelper.get(prefix, material); - // - // EXTRACTOR_RECIPES.recipeBuilder(TFGCore.id("extract_" + material.getName() + "_double_ingot")) - // .EUt(VA[ULV]).duration((int) material.getMass()) - // .inputItems(doubleIngotStack) - // .outputFluids(material.getFluid(288)) - // .save(provider); - // - // MACERATOR_RECIPES.recipeBuilder(TFGCore.id("macerate_" + material.getName() + "_double_ingot")) - // .EUt(VA[ULV]).duration((int) material.getMass()) - // .inputItems(doubleIngotStack) - // .outputItems(dust, material, 2) - // .save(provider); - // } - - - - - - - - // private static void proccessBell(TagPrefix prefix, Material material, TFCProperty property, Consumer provider) { - // var bell = ChemicalHelper.get(prefix, material); - // var outputMaterial = property.getOutputMaterial() == null ? material : property.getOutputMaterial(); - // - // - // ALLOY_SMELTER_RECIPES.recipeBuilder(TFGCore.id(material.getName() + "_bell_from_ingots")) - // .EUt(VA[ULV]).duration((int) material.getMass() * 4) - // .inputItems(ingot, outputMaterial) - // .notConsumable(SHAPE_MOLD_BELL) - // .outputItems(bell) - // .save(provider); - // - // FLUID_SOLIDFICATION_RECIPES.recipeBuilder(TFGCore.id(material.getName() + "_bell_from_fluid")) - // .EUt(VA[ULV]).duration((int) material.getMass() * 4) - // .inputFluids(outputMaterial.getFluid(144)) - // .notConsumable(SHAPE_MOLD_BELL) - // .outputItems(bell) - // .save(provider); - // } - - // private static void processToolHead(TagPrefix prefix, Material material, ItemEntry extruderShape, int circuitValue, Consumer consumer) { - // var output = ChemicalHelper.get(prefix, material); - // if (output.isEmpty()) return; - // - // if (material.hasProperty(PropertyKey.INGOT)) { - // EXTRUDER_RECIPES.recipeBuilder(TFGCore.id("extrude_" + material.getName() + "_ingot_to_" + prefix.name().toLowerCase() + "_head")) - // .duration(12).EUt(32) - // .notConsumable(extruderShape) - // .inputItems(ingot, material, (int) (prefix.materialAmount() / GTValues.M)) - // .outputItems(output) - // .save(consumer); - // } else if (material.hasProperty(PropertyKey.GEM)) { - // LASER_ENGRAVER_RECIPES.recipeBuilder(TFGCore.id("engrave_" + material.getName() + "_gem_to_" + prefix.name().toLowerCase() + "_head")) - // .duration(12).EUt(32) - // .circuitMeta(circuitValue) - // .notConsumable(ChemicalHelper.get(TagPrefix.lens, Glass)) - // .inputItems(gem, material, (int) (prefix.materialAmount() / GTValues.M)) - // .outputItems(output) - // .save(consumer); - // } - // } - - - /** - * Замена ванильного камня в рецепте ступки на тфк камень. - */ -// @Redirect(method = "registerMortarRecipes", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/generated/ToolRecipeHandler;addToolRecipe(Ljava/util/function/Consumer;Lcom/gregtechceu/gtceu/api/data/chemical/material/Material;Lcom/gregtechceu/gtceu/api/item/tool/GTToolType;Z[Ljava/lang/Object;)V"), remap = false) -// private static void tfg$registerMortarRecipes$toolRecipeHandler$addToolRecipe(Consumer provider, Material material, GTToolType tool, boolean mirrored, Object[] recipe) { -// addToolRecipe(provider, material, GTToolType.MORTAR, false, -// " I ", "SIS", "SSS", -// 'I', new UnificationEntry(material.hasProperty(PropertyKey.GEM) ? TagPrefix.gem : TagPrefix.ingot, material), -// 'S', TFGTags.Items.RawRockBlocks); -// } - - /** - * Отключение рецептов MiningHammer, только для металлов, которые дублирует TFC. - */ -// @Redirect(method = "processTool", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/generated/ToolRecipeHandler;addToolRecipe(Ljava/util/function/Consumer;Lcom/gregtechceu/gtceu/api/data/chemical/material/Material;Lcom/gregtechceu/gtceu/api/item/tool/GTToolType;Z[Ljava/lang/Object;)V", ordinal = 0), remap = false) -// private static void tfg$processMiningHammer$toolRecipeHandler$addToolRecipe(Consumer provider, Material material, GTToolType tool, boolean mirrored, Object[] recipe) { -// if (!material.hasFlag(TFGMaterialFlags.HAS_TFC_TOOL)) -// tfg$addToolRecipe(provider, material, GTToolType.MINING_HAMMER, TFGTagPrefix.toolHeadMiningHammer); -// else -// new TFGAdvancedShapedToolRecipeBuilder("mining_hammer_" + material.getName()) -// .input(ChemicalHelper.get(TFGTagPrefix.toolHeadMiningHammer, material)) -// .output(ToolHelper.get(GTToolType.MINING_HAMMER, material)) -// .save(provider); -// } - - /** - * Отключение рецептов Spade, только для металлов, которые дублирует TFC. - */ -// @Redirect(method = "processTool", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/generated/ToolRecipeHandler;addToolRecipe(Ljava/util/function/Consumer;Lcom/gregtechceu/gtceu/api/data/chemical/material/Material;Lcom/gregtechceu/gtceu/api/item/tool/GTToolType;Z[Ljava/lang/Object;)V", ordinal = 1), remap = false) -// private static void processSpade$toolRecipeHandler$addToolRecipe(Consumer provider, Material material, GTToolType tool, boolean mirrored, Object[] recipe) { -// if (!material.hasFlag(TFGMaterialFlags.HAS_TFC_TOOL)) -// tfg$addToolRecipe(provider, material, GTToolType.SPADE, TFGTagPrefix.toolHeadSpade); -// else -// new TFGAdvancedShapedToolRecipeBuilder("spade_" + material.getName()) -// .input(ChemicalHelper.get(TFGTagPrefix.toolHeadSpade, material)) -// .output(ToolHelper.get(GTToolType.SPADE, material)) -// .save(provider); -// } - - /** - * Отключение рецептов Saw, только для металлов, которые дублирует TFC. - */ -// @Redirect(method = "processTool", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/generated/ToolRecipeHandler;addToolRecipe(Ljava/util/function/Consumer;Lcom/gregtechceu/gtceu/api/data/chemical/material/Material;Lcom/gregtechceu/gtceu/api/item/tool/GTToolType;Z[Ljava/lang/Object;)V", ordinal = 2), remap = false) -// private static void tfg$processSaw$toolRecipeHandler$addToolRecipe(Consumer provider, Material material, GTToolType tool, boolean mirrored, Object[] recipe) { -// if (!material.hasFlag(TFGMaterialFlags.HAS_TFC_TOOL)) -// tfg$addToolRecipe(provider, material, GTToolType.SAW, TFGTagPrefix.toolHeadSaw); -// else -// new TFGAdvancedShapedToolRecipeBuilder("saw_" + material.getName()) -// .input(ChemicalHelper.get(TFGTagPrefix.toolHeadSaw, material)) -// .output(ToolHelper.get(GTToolType.SAW, material)) -// .save(provider); -// } - - /** - * Отключение рецептов Axe, только для металлов, которые дублирует TFC. - */ -// @Redirect(method = "processTool", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/generated/ToolRecipeHandler;addToolRecipe(Ljava/util/function/Consumer;Lcom/gregtechceu/gtceu/api/data/chemical/material/Material;Lcom/gregtechceu/gtceu/api/item/tool/GTToolType;Z[Ljava/lang/Object;)V", ordinal = 3), remap = false) -// private static void tfg$processAxe$toolRecipeHandler$addToolRecipe(Consumer provider, Material material, GTToolType tool, boolean mirrored, Object[] recipe) { -// if (!material.hasFlag(TFGMaterialFlags.HAS_TFC_TOOL)) -// tfg$addToolRecipe(provider, material, GTToolType.AXE, TFGTagPrefix.toolHeadAxe); -// else -// new TFGAdvancedShapedToolRecipeBuilder("axe_" + material.getName()) -// .input(ChemicalHelper.get(TFGTagPrefix.toolHeadAxe, material)) -// .output(ToolHelper.get(GTToolType.AXE, material)) -// .save(provider); -// } - - /** - * Отключение рецептов Hoe, только для металлов, которые дублирует TFC. - */ -// @Redirect(method = "processTool", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/generated/ToolRecipeHandler;addToolRecipe(Ljava/util/function/Consumer;Lcom/gregtechceu/gtceu/api/data/chemical/material/Material;Lcom/gregtechceu/gtceu/api/item/tool/GTToolType;Z[Ljava/lang/Object;)V", ordinal = 4), remap = false) -// private static void tfg$processHoe$toolRecipeHandler$addToolRecipe(Consumer provider, Material material, GTToolType tool, boolean mirrored, Object[] recipe) { -// if (!material.hasFlag(TFGMaterialFlags.HAS_TFC_TOOL)) -// tfg$addToolRecipe(provider, material, GTToolType.HOE, TFGTagPrefix.toolHeadHoe); -// else -// new TFGAdvancedShapedToolRecipeBuilder("hoe_" + material.getName()) -// .input(ChemicalHelper.get(TFGTagPrefix.toolHeadHoe, material)) -// .output(ToolHelper.get(GTToolType.HOE, material)) -// .save(provider); -// } - - /** - * Отключение рецептов Pickaxe, только для металлов, которые дублирует TFC. - */ -// @Redirect(method = "processTool", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/generated/ToolRecipeHandler;addToolRecipe(Ljava/util/function/Consumer;Lcom/gregtechceu/gtceu/api/data/chemical/material/Material;Lcom/gregtechceu/gtceu/api/item/tool/GTToolType;Z[Ljava/lang/Object;)V", ordinal = 5), remap = false) -// private static void tfg$processPickaxe$toolRecipeHandler$addToolRecipe(Consumer provider, Material material, GTToolType tool, boolean mirrored, Object[] recipe) { -// if (!material.hasFlag(TFGMaterialFlags.HAS_TFC_TOOL)) -// tfg$addToolRecipe(provider, material, GTToolType.PICKAXE, TFGTagPrefix.toolHeadPickaxe); -// else -// new TFGAdvancedShapedToolRecipeBuilder("pickaxe_" + material.getName()) -// .input(ChemicalHelper.get(TFGTagPrefix.toolHeadPickaxe, material)) -// .output(ToolHelper.get(GTToolType.PICKAXE, material)) -// .save(provider); -// } - - /** - * Отключение рецептов Scythe, только для металлов, которые дублирует TFC. - */ -// @Redirect(method = "processTool", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/generated/ToolRecipeHandler;addToolRecipe(Ljava/util/function/Consumer;Lcom/gregtechceu/gtceu/api/data/chemical/material/Material;Lcom/gregtechceu/gtceu/api/item/tool/GTToolType;Z[Ljava/lang/Object;)V", ordinal = 6), remap = false) -// private static void tfg$processScythe$toolRecipeHandler$addToolRecipe(Consumer provider, Material material, GTToolType tool, boolean mirrored, Object[] recipe) { -// if (!material.hasFlag(TFGMaterialFlags.HAS_TFC_TOOL)) -// tfg$addToolRecipe(provider, material, GTToolType.SCYTHE, TFGTagPrefix.toolHeadScythe); -// else -// new TFGAdvancedShapedToolRecipeBuilder("scythe_" + material.getName()) -// .input(ChemicalHelper.get(TFGTagPrefix.toolHeadScythe, material)) -// .output(ToolHelper.get(GTToolType.SCYTHE, material)) -// .save(provider); -// } - - /** - * Отключение рецептов Shovel, только для металлов, которые дублирует TFC. - */ -// @Redirect(method = "processTool", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/generated/ToolRecipeHandler;addToolRecipe(Ljava/util/function/Consumer;Lcom/gregtechceu/gtceu/api/data/chemical/material/Material;Lcom/gregtechceu/gtceu/api/item/tool/GTToolType;Z[Ljava/lang/Object;)V", ordinal = 7), remap = false) -// private static void tfg$processShovel$toolRecipeHandler$addToolRecipe(Consumer provider, Material material, GTToolType tool, boolean mirrored, Object[] recipe) { -// if (!material.hasFlag(TFGMaterialFlags.HAS_TFC_TOOL)) -// tfg$addToolRecipe(provider, material, GTToolType.SHOVEL, TFGTagPrefix.toolHeadShovel); -// else -// new TFGAdvancedShapedToolRecipeBuilder("shovel_" + material.getName()) -// .input(ChemicalHelper.get(TFGTagPrefix.toolHeadShovel, material)) -// .output(ToolHelper.get(GTToolType.SHOVEL, material)) -// .save(provider); -// } - - /** - * Отключение рецептов Sword, только для металлов, которые дублирует TFC. - */ -// @Redirect(method = "processTool", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/generated/ToolRecipeHandler;addToolRecipe(Ljava/util/function/Consumer;Lcom/gregtechceu/gtceu/api/data/chemical/material/Material;Lcom/gregtechceu/gtceu/api/item/tool/GTToolType;Z[Ljava/lang/Object;)V", ordinal = 8), remap = false) -// private static void tfg$processSword$toolRecipeHandler$addToolRecipe(Consumer provider, Material material, GTToolType tool, boolean mirrored, Object[] recipe) { -// if (!material.hasFlag(TFGMaterialFlags.HAS_TFC_TOOL)) -// tfg$addToolRecipe(provider, material, GTToolType.SWORD, TFGTagPrefix.toolHeadSword); -// else -// new TFGAdvancedShapedToolRecipeBuilder("sword_" + material.getName()) -// .input(ChemicalHelper.get(TFGTagPrefix.toolHeadSword, material)) -// .output(ToolHelper.get(GTToolType.SWORD, material)) -// .save(provider); -// } - - /** - * Отключение рецептов Hammer, только для металлов, которые дублирует TFC. - */ -// @Redirect(method = "processTool", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/generated/ToolRecipeHandler;addToolRecipe(Ljava/util/function/Consumer;Lcom/gregtechceu/gtceu/api/data/chemical/material/Material;Lcom/gregtechceu/gtceu/api/item/tool/GTToolType;Z[Ljava/lang/Object;)V", ordinal = 9), remap = false) -// private static void tfg$processHardHammer$toolRecipeHandler$addToolRecipe(Consumer provider, Material material, GTToolType tool, boolean mirrored, Object[] recipe) { -// if (!material.hasFlag(TFGMaterialFlags.HAS_TFC_TOOL)) -// tfg$addToolRecipe(provider, material, GTToolType.HARD_HAMMER, TFGTagPrefix.toolHeadHammer); -// else -// new TFGAdvancedShapedToolRecipeBuilder("hammer_" + material.getName()) -// .input(ChemicalHelper.get(TFGTagPrefix.toolHeadHammer, material)) -// .output(ToolHelper.get(GTToolType.HARD_HAMMER, material)) -// .save(provider); -// } - - /** - * Отключение рецептов File, только для металлов, которые дублирует TFC. - */ -// @Redirect(method = "processTool", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/generated/ToolRecipeHandler;addToolRecipe(Ljava/util/function/Consumer;Lcom/gregtechceu/gtceu/api/data/chemical/material/Material;Lcom/gregtechceu/gtceu/api/item/tool/GTToolType;Z[Ljava/lang/Object;)V", ordinal = 10), remap = false) -// private static void tfg$processFile$toolRecipeHandler$addToolRecipe(Consumer provider, Material material, GTToolType tool, boolean mirrored, Object[] recipe) { -// if (!material.hasFlag(TFGMaterialFlags.HAS_TFC_TOOL)) -// tfg$addToolRecipe(provider, material, GTToolType.FILE, TFGTagPrefix.toolHeadFile); -// else -// new TFGAdvancedShapedToolRecipeBuilder("file_" + material.getName()) -// .input(ChemicalHelper.get(TFGTagPrefix.toolHeadFile, material)) -// .output(ToolHelper.get(GTToolType.FILE, material)) -// .save(provider); -// } - - /** - * Отключение рецептов Knife, только для металлов, которые дублирует TFC. - */ -// @Redirect(method = "processTool", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/generated/ToolRecipeHandler;addToolRecipe(Ljava/util/function/Consumer;Lcom/gregtechceu/gtceu/api/data/chemical/material/Material;Lcom/gregtechceu/gtceu/api/item/tool/GTToolType;Z[Ljava/lang/Object;)V", ordinal = 11), remap = false) -// private static void tfg$processKnife$toolRecipeHandler$addToolRecipe(Consumer provider, Material material, GTToolType tool, boolean mirrored, Object[] recipe) { -// if (!material.hasFlag(TFGMaterialFlags.HAS_TFC_TOOL)) -// tfg$addToolRecipe(provider, material, GTToolType.KNIFE, TFGTagPrefix.toolHeadKnife); -// else -// new TFGAdvancedShapedToolRecipeBuilder("knife_" + material.getName()) -// .input(ChemicalHelper.get(TFGTagPrefix.toolHeadKnife, material)) -// .output(ToolHelper.get(GTToolType.KNIFE, material)) -// .save(provider); -// } - - /** - * Отключение рецептов ButcheryKnife, только для металлов, которые дублирует TFC. - */ -// @Redirect(method = "processTool", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/generated/ToolRecipeHandler;addToolRecipe(Ljava/util/function/Consumer;Lcom/gregtechceu/gtceu/api/data/chemical/material/Material;Lcom/gregtechceu/gtceu/api/item/tool/GTToolType;Z[Ljava/lang/Object;)V", ordinal = 13), remap = false) -// private static void tfg$processButcheryKnife$toolRecipeHandler$addToolRecipe(Consumer provider, Material material, GTToolType tool, boolean mirrored, Object[] recipe) { -// if (!material.hasFlag(TFGMaterialFlags.HAS_TFC_TOOL)) -// tfg$addToolRecipe(provider, material, GTToolType.BUTCHERY_KNIFE, TFGTagPrefix.toolHeadButcheryKnife); -// else -// new TFGAdvancedShapedToolRecipeBuilder("butchery_knife_" + material.getName()) -// .input(ChemicalHelper.get(TFGTagPrefix.toolHeadButcheryKnife, material)) -// .output(ToolHelper.get(GTToolType.BUTCHERY_KNIFE, material)) -// .save(provider); -// } - -// @Unique -// private static void tfg$addToolRecipe(Consumer provider, Material material, GTToolType toolType, TagPrefix tagPrefix) { -// addToolRecipe(provider, material, toolType, false, "H", "S", 'H', new UnificationEntry(tagPrefix, material), 'S', TFGTags.Items.WoodenSticks); -// } \ No newline at end of file +} \ No newline at end of file diff --git a/kubejs/server_scripts/tfc/recipes.js b/kubejs/server_scripts/tfc/recipes.js index 7d863da4f..40d0402b3 100644 --- a/kubejs/server_scripts/tfc/recipes.js +++ b/kubejs/server_scripts/tfc/recipes.js @@ -143,6 +143,9 @@ const registerTFCRecipes = (event) => { .resultFluid(Fluid.of(outputMaterial.getFluid(), 72)) .id(`tfc:heating/metal/${material.getName()}_rod`) + const ingotItem = ChemicalHelper.get(TagPrefix.ingot, material, 1) + if (ingotItem.isEmpty()) return + // Слиток -> 2 Стержня event.recipes.tfc.anvil(rodItem.withCount(2), ingotItem, ['bend_last', 'draw_second_last', 'draw_third_last']) .tier(tfcProperty.getTier()) @@ -221,14 +224,14 @@ const registerTFCRecipes = (event) => { .id(`tfc:anvil/${material.getName()}_ring`) } - const processBlocks = (tagPrefix, tfcProperty, material, outputMaterial) => { + const processBlock = (tagPrefix, tfcProperty, material, outputMaterial) => { const blockItem = ChemicalHelper.get(tagPrefix, material, 1) if (blockItem.isEmpty()) return // Декрафт блока в жидкость event.recipes.tfc.heating(`#forge:storage_blocks/${material.getName()}`, tfcProperty.getMeltTemp()) .resultFluid(Fluid.of(outputMaterial.getFluid(), 1296)) - .id(`tfc:heating/metal/${material.getName()}_block`) + .id(`tfc:heating/metal/${material.getName()}_storage_block`) } const processTinyDust = (tagPrefix, tfcProperty, material, outputMaterial) => { @@ -308,7 +311,7 @@ const registerTFCRecipes = (event) => { if (oreItem.isEmpty()) return event.recipes.tfc.heating(oreItem, tfcProperty.getMeltTemp()) - .resultFluid(outputMaterial.getFluid(calcAmountOfMetal(48, tfcProperty.getPercentOfMaterial()))) + .resultFluid(Fluid.of(outputMaterial.getFluid(), calcAmountOfMetal(48, tfcProperty.getPercentOfMaterial()))) .id(`tfg:heating/rich_raw/${material.getName()}`) const crushedItem = ChemicalHelper.get(TagPrefix.crushed, material, 1) @@ -325,7 +328,7 @@ const registerTFCRecipes = (event) => { if (oreItem.isEmpty()) return event.recipes.tfc.heating(oreItem, tfcProperty.getMeltTemp()) - .resultFluid(outputMaterial.getFluid(calcAmountOfMetal(36, tfcProperty.getPercentOfMaterial()))) + .resultFluid(Fluid.of(outputMaterial.getFluid(), calcAmountOfMetal(36, tfcProperty.getPercentOfMaterial()))) .id(`tfg:heating/raw/${material.getName()}`) const crushedItem = ChemicalHelper.get(TagPrefix.crushed, material, 1) @@ -342,7 +345,7 @@ const registerTFCRecipes = (event) => { if (oreItem.isEmpty()) return event.recipes.tfc.heating(oreItem, tfcProperty.getMeltTemp()) - .resultFluid(outputMaterial.getFluid(calcAmountOfMetal(24, tfcProperty.getPercentOfMaterial()))) + .resultFluid(Fluid.of(outputMaterial.getFluid(), calcAmountOfMetal(24, tfcProperty.getPercentOfMaterial()))) .id(`tfg:heating/poor_raw/${material.getName()}`) const crushedItem = ChemicalHelper.get(TagPrefix.crushed, material, 1) @@ -356,7 +359,7 @@ const registerTFCRecipes = (event) => { } const processToolSword = (toolType, headTagPrefix, tfcProperty, material, outputMaterial) => { - const ingotDoubleItem = ChemicalHelper.get(TagPrefix.ingotDouble, material, 1) + const ingotDoubleItem = ChemicalHelper.get(TFGTagPrefix.ingotDouble, material, 1) if (ingotDoubleItem.isEmpty()) return // Крафт инструмента @@ -392,7 +395,7 @@ const registerTFCRecipes = (event) => { .id(`tfc:casting/${material.getName()}_sword_blade`) event.recipes.create.filling( - Item.of('tfc:ceramic/sword_blade_mold', getFillingNBT(outputMaterial, 288)), + Item.of('tfc:ceramic/sword_blade_mold', getFluidTankAsNBT(outputMaterial, 288)), [ Fluid.of(outputMaterial.getFluid(), 288), Item.of('tfc:ceramic/sword_blade_mold').strongNBT() @@ -440,7 +443,7 @@ const registerTFCRecipes = (event) => { .id(`tfc:casting/${material.getName()}_pickaxe_head`) event.recipes.create.filling( - Item.of('tfc:ceramic/pickaxe_head_mold', getFillingNBT(outputMaterial, 144)), + Item.of('tfc:ceramic/pickaxe_head_mold', getFluidTankAsNBT(outputMaterial, 144)), [ Fluid.of(outputMaterial.getFluid(), 144), Item.of('tfc:ceramic/pickaxe_head_mold').strongNBT() @@ -488,7 +491,7 @@ const registerTFCRecipes = (event) => { .id(`tfc:casting/${material.getName()}_axe_head`) event.recipes.create.filling( - Item.of('tfc:ceramic/axe_head_mold', getFillingNBT(outputMaterial, 144)), + Item.of('tfc:ceramic/axe_head_mold', getFluidTankAsNBT(outputMaterial, 144)), [ Fluid.of(outputMaterial.getFluid(), 144), Item.of('tfc:ceramic/axe_head_mold').strongNBT() @@ -536,7 +539,7 @@ const registerTFCRecipes = (event) => { .id(`tfc:casting/${material.getName()}_shovel_head`) event.recipes.create.filling( - Item.of('tfc:ceramic/shovel_head_mold', getFillingNBT(outputMaterial, 144)), + Item.of('tfc:ceramic/shovel_head_mold', getFluidTankAsNBT(outputMaterial, 144)), [ Fluid.of(outputMaterial.getFluid(), 144), Item.of('tfc:ceramic/shovel_head_mold').strongNBT() @@ -583,7 +586,7 @@ const registerTFCRecipes = (event) => { .id(`tfc:casting/${material.getName()}_hoe_head`) event.recipes.create.filling( - Item.of('tfc:ceramic/hoe_head_mold', getFillingNBT(outputMaterial, 144)), + Item.of('tfc:ceramic/hoe_head_mold', getFluidTankAsNBT(outputMaterial, 144)), [ Fluid.of(outputMaterial.getFluid(), 144), Item.of('tfc:ceramic/hoe_head_mold').strongNBT() @@ -630,7 +633,7 @@ const registerTFCRecipes = (event) => { .id(`tfc:casting/${material.getName()}_knife_blade`) event.recipes.create.filling( - Item.of('tfc:ceramic/knife_blade_mold', getFillingNBT(outputMaterial, 144)), + Item.of('tfc:ceramic/knife_blade_mold', getFluidTankAsNBT(outputMaterial, 144)), [ Fluid.of(outputMaterial.getFluid(), 144), Item.of('tfc:ceramic/knife_blade_mold').strongNBT() @@ -655,7 +658,7 @@ const registerTFCRecipes = (event) => { } const processToolMiningHammer = (toolType, headTagPrefix, tfcProperty, material, outputMaterial) => { - const ingotDoubleItem = ChemicalHelper.get(TagPrefix.ingotDouble, material, 1) + const ingotDoubleItem = ChemicalHelper.get(TFGTagPrefix.ingotDouble, material, 1) if (ingotDoubleItem.isEmpty()) return // Декрафт инструмента в жидкость @@ -723,7 +726,7 @@ const registerTFCRecipes = (event) => { .id(`tfc:casting/${material.getName()}_scythe_blade`) event.recipes.create.filling( - Item.of('tfc:ceramic/scythe_blade_mold', getFillingNBT(outputMaterial, 144)), + Item.of('tfc:ceramic/scythe_blade_mold', getFluidTankAsNBT(outputMaterial, 144)), [ Fluid.of(outputMaterial.getFluid(), 144), Item.of('tfc:ceramic/scythe_blade_mold').strongNBT() @@ -801,7 +804,7 @@ const registerTFCRecipes = (event) => { .id(`tfc:casting/${material.getName()}_hammer_head`) event.recipes.create.filling( - Item.of('tfc:ceramic/hammer_head_mold', getFillingNBT(outputMaterial, 144)), + Item.of('tfc:ceramic/hammer_head_mold', getFluidTankAsNBT(outputMaterial, 144)), [ Fluid.of(outputMaterial.getFluid(), 144), Item.of('tfc:ceramic/hammer_head_mold').strongNBT() @@ -850,7 +853,7 @@ const registerTFCRecipes = (event) => { .id(`tfc:casting/${material.getName()}_saw_blade`) event.recipes.create.filling( - Item.of('tfc:ceramic/saw_blade_mold', getFillingNBT(outputMaterial, 144)), + Item.of('tfc:ceramic/saw_blade_mold', getFluidTankAsNBT(outputMaterial, 144)), [ Fluid.of(outputMaterial.getFluid(), 144), Item.of('tfc:ceramic/saw_blade_mold').strongNBT() @@ -894,7 +897,7 @@ const registerTFCRecipes = (event) => { } const processToolSpade = (toolType, headTagPrefix, tfcProperty, material, outputMaterial) => { - const ingotDoubleItem = ChemicalHelper.get(TagPrefix.ingotDouble, material, 1) + const ingotDoubleItem = ChemicalHelper.get(TFGTagPrefix.ingotDouble, material, 1) if (ingotDoubleItem.isEmpty()) return // Декрафт инструмента в жидкость @@ -949,7 +952,7 @@ const registerTFCRecipes = (event) => { .id(`tfc:casting/${material.getName()}_propick_head`) event.recipes.create.filling( - Item.of('tfc:ceramic/propick_head_mold', getFillingNBT(outputMaterial, 144)), + Item.of('tfc:ceramic/propick_head_mold', getFluidTankAsNBT(outputMaterial, 144)), [ Fluid.of(outputMaterial.getFluid(), 144), Item.of('tfc:ceramic/propick_head_mold').strongNBT() @@ -982,7 +985,7 @@ const registerTFCRecipes = (event) => { .id(`tfc:casting/${material.getName()}_javelin_head`) event.recipes.create.filling( - Item.of('tfc:ceramic/javelin_head_mold', getFillingNBT(outputMaterial, 144)), + Item.of('tfc:ceramic/javelin_head_mold', getFluidTankAsNBT(outputMaterial, 144)), [ Fluid.of(outputMaterial.getFluid(), 144), Item.of('tfc:ceramic/javelin_head_mold').strongNBT() @@ -1015,7 +1018,7 @@ const registerTFCRecipes = (event) => { .id(`tfc:casting/${material.getName()}_chisel_head`) event.recipes.create.filling( - Item.of('tfc:ceramic/chisel_head_mold', getFillingNBT(outputMaterial, 144)), + Item.of('tfc:ceramic/chisel_head_mold', getFluidTankAsNBT(outputMaterial, 144)), [ Fluid.of(outputMaterial.getFluid(), 144), Item.of('tfc:ceramic/chisel_head_mold').strongNBT() @@ -1043,7 +1046,7 @@ const registerTFCRecipes = (event) => { .id(`tfc:casting/${material.getName()}_mace_head`) event.recipes.create.filling( - Item.of('tfc:ceramic/mace_head_mold', getFillingNBT(outputMaterial, 288)), + Item.of('tfc:ceramic/mace_head_mold', getFluidTankAsNBT(outputMaterial, 288)), [ Fluid.of(outputMaterial.getFluid(), 288), Item.of('tfc:ceramic/mace_head_mold').strongNBT() @@ -1060,7 +1063,7 @@ const registerTFCRecipes = (event) => { const processToolShield = (tfcProperty, material, outputMaterial) => { const shieldItem = Item.of(`tfc:metal/shield/${material.getName()}`) - if (maceItem.isEmpty()) return + if (shieldItem.isEmpty()) return // Декрафт щита в жидкость event.recipes.tfc.heating(shieldItem, tfcProperty.getMeltTemp()) @@ -1107,7 +1110,7 @@ const registerTFCRecipes = (event) => { const processTuyere = (tfcProperty, material, outputMaterial) => { const tuyereItem = Item.of(`tfc:metal/tuyere/${material.getName()}`) - if (fishingRodItem.isEmpty()) return + if (tuyereItem.isEmpty()) return // Декрафт инструмента в жидкость event.recipes.tfc.heating(tuyereItem, tfcProperty.getMeltTemp()) @@ -1342,15 +1345,15 @@ const registerTFCRecipes = (event) => { // Крафт в смелтере event.recipes.gtceu.alloy_smelter(`tfg:${material.getName()}_anvil_from_ingots`) .itemInputs(ingotItem.copyWithCount(14)) - .notConsumable('gtceu:anvil_casting_mold') - .outputItems(anvilItem) + .notConsumable('tfg:anvil_casting_mold') + .itemOutputs(anvilItem) .EUt(GTValues.VA[GTValues.ULV]).duration(material.getMass() * 6) // Крафт в солидифаере - event.recipes.gtceu.solidifier(`tfg:${material.getName()}_anvil_from_fluid`) - .inputFluids(outputMaterial.getFluid(2016)) - .notConsumable('gtceu:anvil_casting_mold') - .outputItems(anvilItem) + event.recipes.gtceu.fluid_solidifier(`tfg:${material.getName()}_anvil_from_fluid`) + .inputFluids(Fluid.of(outputMaterial.getFluid(), 2016)) + .notConsumable('tfg:anvil_casting_mold') + .itemOutputs(anvilItem) .EUt(GTValues.VA[GTValues.ULV]).duration(material.getMass() * 6) } @@ -1369,15 +1372,15 @@ const registerTFCRecipes = (event) => { // Крафт в смелтере event.recipes.gtceu.alloy_smelter(`tfg:${material.getName()}_unfinished_lamp_from_ingots`) .itemInputs(ingotItem) - .notConsumable('gtceu:lamp_casting_mold') - .outputItems(lampUnfinishedItem) + .notConsumable('tfg:lamp_casting_mold') + .itemOutputs(lampUnfinishedItem) .EUt(GTValues.VA[GTValues.ULV]).duration(material.getMass() * 2) // Крафт в солидифаере - event.recipes.gtceu.solidifier(`tfg:${material.getName()}_unfinished_lamp_from_fluid`) - .inputFluids(outputMaterial.getFluid(144)) - .notConsumable('gtceu:lamp_casting_mold') - .outputItems(lampUnfinishedItem) + event.recipes.gtceu.fluid_solidifier(`tfg:${material.getName()}_unfinished_lamp_from_fluid`) + .inputFluids(Fluid.of(outputMaterial.getFluid(), 144)) + .notConsumable('tfg:lamp_casting_mold') + .itemOutputs(lampUnfinishedItem) .EUt(GTValues.VA[GTValues.ULV]).duration(material.getMass() * 2) } @@ -1397,14 +1400,14 @@ const registerTFCRecipes = (event) => { event.recipes.gtceu.alloy_smelter(`tfg:${material.getName()}_lamp`) .itemInputs(lampUnfinishedItem, 'tfc:lamp_glass') .circuit(12) - .outputItems(lampItem) + .itemOutputs(lampItem) .EUt(GTValues.VA[GTValues.ULV]).duration(material.getMass() * 7) event.recipes.gtceu.alloy_smelter(`tfg:${material.getName()}_lamp_from_liquid`) .itemInputs(lampUnfinishedItem) .inputFluids(GTMaterials.Glass.getFluid(576)) .circuit(13) - .outputItems(lampItem) + .itemOutputs(lampItem) .EUt(GTValues.VA[GTValues.ULV]).duration(material.getMass() * 6) } @@ -1431,15 +1434,15 @@ const registerTFCRecipes = (event) => { // Крафт в смелтере event.recipes.gtceu.alloy_smelter(`tfg:${material.getName()}_trapdoor_from_ingots`) .itemInputs(ingotItem) - .notConsumable('gtceu:trapdoor_casting_mold') - .outputItems(trapdoorItem) + .notConsumable('tfg:trapdoor_casting_mold') + .itemOutputs(trapdoorItem) .EUt(GTValues.VA[GTValues.ULV]).duration(material.getMass() * 5) // Крафт в солидифаере - event.recipes.gtceu.solidifier(`tfg:${material.getName()}_trapdoor_from_fluid`) - .inputFluids(outputMaterial.getFluid(144)) - .notConsumable('gtceu:trapdoor_casting_mold') - .outputItems(trapdoorItem) + event.recipes.gtceu.fluid_solidifier(`tfg:${material.getName()}_trapdoor_from_fluid`) + .inputFluids(Fluid.of(outputMaterial.getFluid(), 144)) + .notConsumable('tfg:trapdoor_casting_mold') + .itemOutputs(trapdoorItem) .EUt(GTValues.VA[GTValues.ULV]).duration(material.getMass() * 5) } @@ -1452,18 +1455,21 @@ const registerTFCRecipes = (event) => { .resultFluid(Fluid.of(outputMaterial.getFluid(), 9)) .id(`tfc:heating/metal/${material.getName()}_chain`) + const ingotItem = ChemicalHelper.get(TagPrefix.ingot, material, 1) + if (ingotItem.isEmpty()) return + // Крафт в смелтере event.recipes.gtceu.alloy_smelter(`tfg:${material.getName()}_chain_from_ingots`) .itemInputs(ingotItem) - .notConsumable('gtceu:chain_casting_mold') - .outputItems(barsItem.copyWithCount(9)) + .notConsumable('tfg:chain_casting_mold') + .itemOutputs(chainItem.copyWithCount(9)) .EUt(GTValues.VA[GTValues.ULV]).duration(material.getMass() * 2) // Крафт в солидифаере - event.recipes.gtceu.solidifier(`tfg:${material.getName()}_chain_from_fluid`) - .inputFluids(outputMaterial.getFluid(144)) - .notConsumable('gtceu:chain_casting_mold') - .outputItems(barsItem.copyWithCount(9)) + event.recipes.gtceu.fluid_solidifier(`tfg:${material.getName()}_chain_from_fluid`) + .inputFluids(Fluid.of(outputMaterial.getFluid(), 144)) + .notConsumable('tfg:chain_casting_mold') + .itemOutputs(chainItem.copyWithCount(9)) .EUt(GTValues.VA[GTValues.ULV]).duration(material.getMass() * 2) } @@ -1499,7 +1505,7 @@ const registerTFCRecipes = (event) => { event.recipes.gtceu.assembler(`tfg:${material.getName()}_bars_from_rods`) .itemInputs(rodtItem.withCount(3)) .circuit(3) - .outputItems(barsItem.copyWithCount(4)) + .itemOutputs(barsItem.copyWithCount(4)) .EUt(GTValues.VA[GTValues.ULV]).duration(material.getMass() * 8) } @@ -1508,20 +1514,37 @@ const registerTFCRecipes = (event) => { const bellItem = ChemicalHelper.get(tagPrefix, material, 1) - event.recipes.tfc.casting(bellItem, 'tfc:ceramic/bell_mold', outputMaterial.getFluid(144), 1) + event.recipes.tfc.casting(bellItem, 'tfc:ceramic/bell_mold', Fluid.of(outputMaterial.getFluid(), 144), 1) .id(`tfc:casting/${material.getName()}_bell`) event.recipes.tfc.heating(bellItem, tfcProperty.getMeltTemp()) - .resultFluid(outputMaterial.getFluid(144)) + .resultFluid(Fluid.of(outputMaterial.getFluid(), 144)) .id(`tfc:heating/${material.getName()}_bell`) event.recipes.create.filling( - Item.of('tfc:ceramic/bell_mold', getFillingNBT(outputMaterial, 144)), + Item.of('tfc:ceramic/bell_mold', getFluidTankAsNBT(outputMaterial, 144)), [ - outputMaterial.getFluid(144), + Fluid.of(outputMaterial.getFluid(), 144), Item.of('tfc:ceramic/bell_mold').strongNBT() ] ).id(`tfg:tfc/filling/${material.getName()}_bell_mold`) + + const ingotItem = ChemicalHelper.get(TagPrefix.ingot, material, 1) + if (ingotItem.isEmpty()) return + + // Крафт в смелтере + event.recipes.gtceu.alloy_smelter(`tfg:${material.getName()}_bell_from_ingots`) + .itemInputs(ingotItem) + .notConsumable('tfg:bell_casting_mold') + .itemOutputs(bellItem) + .EUt(GTValues.VA[GTValues.ULV]).duration(material.getMass() * 8) + + // Крафт в солидифаере + event.recipes.gtceu.fluid_solidifier(`tfg:${material.getName()}_bell_from_fluid`) + .inputFluids(Fluid.of(outputMaterial.getFluid(), 144)) + .notConsumable('tfg:bell_casting_mold') + .itemOutputs(bellItem) + .EUt(GTValues.VA[GTValues.ULV]).duration(material.getMass() * 8) } const processTFCSmallOres = (tagPrefix, tfcProperty, material, outputMaterial) => { @@ -1564,23 +1587,23 @@ const registerTFCRecipes = (event) => { processDoubleIngot(TFGTagPrefix.ingotDouble, tfcProperty, material, outputMaterial) processPlate(TagPrefix.plate, tfcProperty, material, outputMaterial) processDoublePlate(TagPrefix.plateDouble, tfcProperty, material, outputMaterial) - // processRods(TagPrefix.rod, tfcProperty, material, outputMaterial) - // processLongRods(TagPrefix.rodLong, tfcProperty, material, outputMaterial) - // processBolts(TagPrefix.bolt, tfcProperty, material, outputMaterial) - // processScrews(TagPrefix.screw, tfcProperty, material, outputMaterial) - // processRings(TagPrefix.ring, tfcProperty, material, outputMaterial) - // processBlock(TagPrefix.block, tfcProperty, material, outputMaterial) - // processTinyDust(TagPrefix.dustTiny, tfcProperty, material, outputMaterial) - // processSmallDust(TagPrefix.dustSmall, tfcProperty, material, outputMaterial) - // processDust(TagPrefix.dust, tfcProperty, material, outputMaterial) - // processImpureDust(TagPrefix.dustImpure, tfcProperty, material, outputMaterial) - // processPurifiedDust(TagPrefix.dustPure, tfcProperty, material, outputMaterial) - // processCrushedOre(TagPrefix.crushed, tfcProperty, material, outputMaterial) - // processCrushedPurifiedOre(TagPrefix.crushedPurified, tfcProperty, material, outputMaterial) - // processCrushedRefinedOre(TagPrefix.crushedRefined, tfcProperty, material, outputMaterial) - // processRichRawOre(TFGTagPrefix.richRawOre, tfcProperty, material, outputMaterial) - // processNormalRawore(TagPrefix.rawOre, tfcProperty, material, outputMaterial) - // processPoorRawOre(TFGTagPrefix.poorRawOre, tfcProperty, material, outputMaterial) + processRods(TagPrefix.rod, tfcProperty, material, outputMaterial) + processLongRods(TagPrefix.rodLong, tfcProperty, material, outputMaterial) + processBolts(TagPrefix.bolt, tfcProperty, material, outputMaterial) + processScrews(TagPrefix.screw, tfcProperty, material, outputMaterial) + processRings(TagPrefix.ring, tfcProperty, material, outputMaterial) + processBlock(TagPrefix.block, tfcProperty, material, outputMaterial) + processTinyDust(TagPrefix.dustTiny, tfcProperty, material, outputMaterial) + processSmallDust(TagPrefix.dustSmall, tfcProperty, material, outputMaterial) + processDust(TagPrefix.dust, tfcProperty, material, outputMaterial) + processImpureDust(TagPrefix.dustImpure, tfcProperty, material, outputMaterial) + processPurifiedDust(TagPrefix.dustPure, tfcProperty, material, outputMaterial) + processCrushedOre(TagPrefix.crushed, tfcProperty, material, outputMaterial) + processCrushedPurifiedOre(TagPrefix.crushedPurified, tfcProperty, material, outputMaterial) + processCrushedRefinedOre(TagPrefix.crushedRefined, tfcProperty, material, outputMaterial) + processRichRawOre(TFGTagPrefix.richRawOre, tfcProperty, material, outputMaterial) + processNormalRawore(TagPrefix.rawOre, tfcProperty, material, outputMaterial) + processPoorRawOre(TFGTagPrefix.poorRawOre, tfcProperty, material, outputMaterial) // 1. Тип инструмента // 2. Префикс ассоциируемый с текущим предметом. @@ -1589,49 +1612,49 @@ const registerTFCRecipes = (event) => { // 5. Материал в который объект должен быть преобразован после разборки. if (material.hasFlag(TFGMaterialFlags.HAS_TFC_TOOL)) { - // processToolSword(GTToolType.SWORD, TFGTagPrefix.toolHeadSword, tfcProperty, material, outputMaterial) - // processToolPickaxe(GTToolType.PICKAXE, TagPrefix.toolHeadPickaxe, tfcProperty, material, outputMaterial) - // processToolAxe(GTToolType.AXE, TFGTagPrefix.toolHeadAxe, tfcProperty, material, outputMaterial) - // processToolShovel(GTToolType.SHOVEL, TFGTagPrefix.toolHeadShovel, tfcProperty, material, outputMaterial) - // processToolHoe(GTToolType.HOE, TFGTagPrefix.toolHeadHoe, tfcProperty, material, outputMaterial) - // processToolKnife(GTToolType.KNIFE, TFGTagPrefix.toolHeadKnife, tfcProperty, material, outputMaterial) - // processToolMiningHammer(GTToolType.MINING_HAMMER, TFGTagPrefix.toolHeadMiningHammer, tfcProperty, material, outputMaterial) - // processToolScythe(GTToolType.SCYTHE, TFGTagPrefix.toolHeadScythe, tfcProperty, material, outputMaterial) // because sense dont make sense - // processToolFile(GTToolType.FILE, TFGTagPrefix.toolHeadFile, tfcProperty, material, outputMaterial) - // processToolHammer(GTToolType.HARD_HAMMER, TFGTagPrefix.toolHeadHammer, tfcProperty, material, outputMaterial) - // processToolSaw(GTToolType.SAW, TFGTagPrefix.toolHeadSaw, tfcProperty, material, outputMaterial) - // processToolButcheryKnife(GTToolType.BUTCHERY_KNIFE, TFGTagPrefix.toolHeadButcheryKnife, tfcProperty, material, outputMaterial) - // processToolSpade(GTToolType.SPADE, TFGTagPrefix.toolHeadSpade, tfcProperty, material, outputMaterial) + processToolSword(GTToolType.SWORD, TFGTagPrefix.toolHeadSword, tfcProperty, material, outputMaterial) + processToolPickaxe(GTToolType.PICKAXE, TFGTagPrefix.toolHeadPickaxe, tfcProperty, material, outputMaterial) + processToolAxe(GTToolType.AXE, TFGTagPrefix.toolHeadAxe, tfcProperty, material, outputMaterial) + processToolShovel(GTToolType.SHOVEL, TFGTagPrefix.toolHeadShovel, tfcProperty, material, outputMaterial) + processToolHoe(GTToolType.HOE, TFGTagPrefix.toolHeadHoe, tfcProperty, material, outputMaterial) + processToolKnife(GTToolType.KNIFE, TFGTagPrefix.toolHeadKnife, tfcProperty, material, outputMaterial) + processToolMiningHammer(GTToolType.MINING_HAMMER, TFGTagPrefix.toolHeadMiningHammer, tfcProperty, material, outputMaterial) + processToolScythe(GTToolType.SCYTHE, TFGTagPrefix.toolHeadScythe, tfcProperty, material, outputMaterial) // because sense dont make sense + processToolFile(GTToolType.FILE, TFGTagPrefix.toolHeadFile, tfcProperty, material, outputMaterial) + processToolHammer(GTToolType.HARD_HAMMER, TFGTagPrefix.toolHeadHammer, tfcProperty, material, outputMaterial) + processToolSaw(GTToolType.SAW, TFGTagPrefix.toolHeadSaw, tfcProperty, material, outputMaterial) + processToolButcheryKnife(GTToolType.BUTCHERY_KNIFE, TFGTagPrefix.toolHeadButcheryKnife, tfcProperty, material, outputMaterial) + processToolSpade(GTToolType.SPADE, TFGTagPrefix.toolHeadSpade, tfcProperty, material, outputMaterial) - // processToolPropick(TFGTagPrefix.toolHeadPropick, tfcProperty, material, outputMaterial) - // processToolJavelin(TFGTagPrefix.toolHeadJavelin, tfcProperty, material, outputMaterial) - // processToolChisel(TFGTagPrefix.toolHeadChisel, tfcProperty, material, outputMaterial) - // processToolMace(TFGTagPrefix.toolHeadMace, tfcProperty, material, outputMaterial) + processToolPropick(TFGTagPrefix.toolHeadPropick, tfcProperty, material, outputMaterial) + processToolJavelin(TFGTagPrefix.toolHeadJavelin, tfcProperty, material, outputMaterial) + processToolChisel(TFGTagPrefix.toolHeadChisel, tfcProperty, material, outputMaterial) + processToolMace(TFGTagPrefix.toolHeadMace, tfcProperty, material, outputMaterial) - // processToolShield(tfcProperty, material, outputMaterial) - // processToolFishingRod(tfcProperty, material, outputMaterial) - // processTuyere(tfcProperty, material, outputMaterial) - // processToolTongs(tfcProperty, material, outputMaterial) + processToolShield(tfcProperty, material, outputMaterial) + processToolFishingRod(tfcProperty, material, outputMaterial) + processTuyere(tfcProperty, material, outputMaterial) + processToolTongs(tfcProperty, material, outputMaterial) } if (material.hasFlag(TFGMaterialFlags.HAS_TFC_ARMOR)) { - // processTFCArmor(tfcProperty, material, outputMaterial) + processTFCArmor(tfcProperty, material, outputMaterial) } - // processTFCMetalBlocks(TFGTagPrefix.blockPlated, tfcProperty, material, outputMaterial) - // processTFCMetalStairs(TFGTagPrefix.stairPlated, tfcProperty, material, outputMaterial) - // processTFCMetalSlabs(TFGTagPrefix.slabPlated, tfcProperty, material, outputMaterial) + processTFCMetalBlocks(TFGTagPrefix.blockPlated, tfcProperty, material, outputMaterial) + processTFCMetalStairs(TFGTagPrefix.stairPlated, tfcProperty, material, outputMaterial) + processTFCMetalSlabs(TFGTagPrefix.slabPlated, tfcProperty, material, outputMaterial) - // processAnvils(TFGTagPrefix.anvil, tfcProperty, material, outputMaterial) - // processUnfinishedLamp(TFGTagPrefix.lampUnfinished, tfcProperty, material, outputMaterial) - // processLamps(TFGTagPrefix.lamp, tfcProperty, material, outputMaterial) - // processTrapdoors(TFGTagPrefix.trapdoor, tfcProperty, material, outputMaterial) - // processChains(TFGTagPrefix.chain, tfcProperty, material, outputMaterial) - // processBars(TFGTagPrefix.bars, tfcProperty, material, outputMaterial) - // processBell(TFGTagPrefix.bell, tfcProperty, material, outputMaterial) + processAnvils(TFGTagPrefix.anvil, tfcProperty, material, outputMaterial) + processUnfinishedLamp(TFGTagPrefix.lampUnfinished, tfcProperty, material, outputMaterial) + processLamps(TFGTagPrefix.lamp, tfcProperty, material, outputMaterial) + processTrapdoors(TFGTagPrefix.trapdoor, tfcProperty, material, outputMaterial) + processChains(TFGTagPrefix.chain, tfcProperty, material, outputMaterial) + processBars(TFGTagPrefix.bars, tfcProperty, material, outputMaterial) + processBell(TFGTagPrefix.bell, tfcProperty, material, outputMaterial) - // processTFCSmallOres(TFGTagPrefix.oreSmall, tfcProperty, material, outputMaterial) - // processTFCSmallNativeOres(TFGTagPrefix.oreSmallNative, tfcProperty, material, outputMaterial) + processTFCSmallOres(TFGTagPrefix.oreSmall, tfcProperty, material, outputMaterial) + processTFCSmallNativeOres(TFGTagPrefix.oreSmallNative, tfcProperty, material, outputMaterial) } }) //#endregion diff --git a/kubejs/startup_scripts/gregtech/blocks.js b/kubejs/startup_scripts/gregtech/blocks.js new file mode 100644 index 000000000..1560d5128 --- /dev/null +++ b/kubejs/startup_scripts/gregtech/blocks.js @@ -0,0 +1,16 @@ +// priority: 0 + +const registerGregTechBlocks = (event) => { + + //todo: + event.create('tfg:copper_coil_block', 'gtceu:coil') + .temperature(500) + .level(0) + .energyDiscount(1) + .tier(0) + .coilMaterial(() => GTMaterials.get('copper')) + .texture('kubejs:block/example_block') + .hardness(2) + .requiresTool(true) + .material('metal') +} \ No newline at end of file diff --git a/kubejs/startup_scripts/gregtech/machines.js b/kubejs/startup_scripts/gregtech/machines.js index a631a5555..3ccd4fa1f 100644 --- a/kubejs/startup_scripts/gregtech/machines.js +++ b/kubejs/startup_scripts/gregtech/machines.js @@ -38,7 +38,7 @@ const registerGregTechMachines = (event) => { .aisle("CWI", "CWA", "#W#") .where('A', Predicates.controller(Predicates.blocks(definition.get()))) .where('I', Predicates.abilities(PartAbility.IMPORT_ITEMS).setExactLimit(1)) - .where('W', Predicates.blocks(GTBlocks.COIL_CUPRONICKEL.get())) + .where('W', Predicates.blocks('tfg:copper_coil_block')) .where("C", Predicates.blocks(GTBlocks.CASING_STEEL_SOLID.get())) .where('#', Predicates.any()) .where('K', Predicates.abilities(PartAbility.INPUT_KINETIC).setExactLimit(1)) diff --git a/kubejs/startup_scripts/main_startup_script.js b/kubejs/startup_scripts/main_startup_script.js index 6a5bf6fda..a52cbe931 100644 --- a/kubejs/startup_scripts/main_startup_script.js +++ b/kubejs/startup_scripts/main_startup_script.js @@ -10,7 +10,9 @@ StartupEvents.registry('item', event => { /** * Событие регистрации блоков. */ -StartupEvents.registry('block', event => {}) +StartupEvents.registry('block', event => { + registerGregTechBlocks(event) +}) /** * Событие изменения блоков.