Refactor of material recipes (#2732)
* refactor * phew * drive-by fix * all done I think * cleaned up some lines that didn't do anything, added more comments, removed log spam
This commit is contained in:
parent
8c6551dda6
commit
2e10938e1c
24 changed files with 2107 additions and 3303 deletions
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
const registerGTCEURecipes = (event) => {
|
||||
|
||||
registerGTCEUMetalRecipes(event)
|
||||
registerGTCEURecyclingRecipes(event)
|
||||
registerGTCEuMachineRecipes(event)
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -778,6 +778,7 @@ function removeGTCEURecipes(event) {
|
|||
event.remove({ id: 'greate:mixing/integration/gtceu/mixer/mossy_red_granite_cobblestone_from_vine' })
|
||||
|
||||
event.remove({ id: 'gtceu:lathe/stone_rod_from_cobblestone' })
|
||||
event.remove({ id: 'gtceu:extractor/extract_sodium_hydroxide_dust' })
|
||||
|
||||
// who the hell is grinding metal ingots with their bare hands?
|
||||
event.remove({ id: 'gtceu:shaped/mortar_grind_antimony' })
|
||||
|
|
|
|||
|
|
@ -66,135 +66,6 @@ const generateCutterRecipe = (event, input, output, duration, EUt, id) => {
|
|||
|
||||
//#endregion
|
||||
|
||||
//#region Filling NBT
|
||||
/**
|
||||
* Function to get fluid filling NBT.
|
||||
*
|
||||
* @param {string} material -Fluid
|
||||
* @param {number} amount -mB
|
||||
* @returns {{ tank: { FluidName: string; Amount: number; }; }}
|
||||
*/
|
||||
const getFillingNBT = (material, amount) => {
|
||||
return {
|
||||
tank: {
|
||||
FluidName: Fluid.of(material.getFluid()).getId(),
|
||||
Amount: amount
|
||||
}
|
||||
}
|
||||
}
|
||||
//#endregion
|
||||
|
||||
//#region Plated Blocks
|
||||
/**
|
||||
* Function for generating plated block recipes.
|
||||
*
|
||||
* @param {*} event
|
||||
* @param {GTMaterial} material
|
||||
*/
|
||||
function generatePlatedBlockRecipe(event, material) {
|
||||
// firmaciv plated blocks don't have this property
|
||||
const tfcProperty = material.getProperty(TFGPropertyKey.TFC_PROPERTY)
|
||||
const outputMaterial = (tfcProperty === null || tfcProperty.getOutputMaterial() === null) ? material : tfcProperty.getOutputMaterial()
|
||||
|
||||
const plateItem = ChemicalHelper.get(TagPrefix.plate, material, 1);
|
||||
|
||||
const platedBlock = ChemicalHelper.get(TFGTagPrefix.blockPlated, material, 1);
|
||||
const platedSlab = ChemicalHelper.get(TFGTagPrefix.slabPlated, material, 1);
|
||||
const platedStair = ChemicalHelper.get(TFGTagPrefix.stairPlated, material, 1);
|
||||
|
||||
if (platedBlock === null) return;
|
||||
|
||||
let tfcMetalName = material.getName();
|
||||
if (tfcMetalName === "iron") {
|
||||
tfcMetalName = "cast_iron";
|
||||
}
|
||||
|
||||
event.shapeless(platedBlock, ['#forge:stone_bricks', plateItem, '#forge:tools/hammers'])
|
||||
.id(`tfg:shapeless/${material.getName()}_plated_block`)
|
||||
event.recipes.gtceu.assembler(`tfg:${material.getName()}_plated_block`)
|
||||
.itemInputs('#forge:stone_bricks', plateItem)
|
||||
.itemOutputs(platedBlock)
|
||||
.circuit(10)
|
||||
.duration(50)
|
||||
.EUt(GTValues.VA[GTValues.ULV])
|
||||
|
||||
if (tfcProperty !== null) {
|
||||
event.recipes.tfc.heating(platedBlock, tfcProperty.getMeltTemp())
|
||||
.resultFluid(Fluid.of(outputMaterial.getFluid(), 144))
|
||||
.id(`tfc:heating/metal/${tfcMetalName}_block`)
|
||||
}
|
||||
event.recipes.gtceu.macerator(`tfg:${material.getName()}_plated_block`)
|
||||
.itemInputs(platedBlock)
|
||||
.itemOutputs(ChemicalHelper.get(TagPrefix.dust, material, 1))
|
||||
.duration(material.getMass())
|
||||
.category(GTRecipeCategories.MACERATOR_RECYCLING)
|
||||
.EUt(GTValues.VA[GTValues.ULV])
|
||||
event.recipes.gtceu.arc_furnace(`tfg:${material.getName()}_plated_block`)
|
||||
.itemInputs(platedBlock)
|
||||
.itemOutputs(ChemicalHelper.get(TagPrefix.ingot, material, 1))
|
||||
.duration(material.getMass())
|
||||
.category(GTRecipeCategories.ARC_FURNACE_RECYCLING)
|
||||
.EUt(GTValues.VA[GTValues.LV])
|
||||
|
||||
|
||||
event.shapeless(platedSlab.withCount(2), ['2x #tfg:brick_slabs', plateItem, '#forge:tools/hammers'])
|
||||
.id(`tfg:item_application/${material.getName()}_plated_slab`)
|
||||
event.recipes.gtceu.assembler(`tfg:${material.getName()}_plated_slab`)
|
||||
.itemInputs('2x #tfg:brick_slabs', plateItem)
|
||||
.itemOutputs(platedSlab.withCount(2))
|
||||
.circuit(10)
|
||||
.duration(50)
|
||||
.EUt(GTValues.VA[GTValues.ULV])
|
||||
|
||||
if (tfcProperty !== null) {
|
||||
// Slabs are lossy because it's possible to plate a double slab block with one metal plate
|
||||
event.recipes.tfc.heating(platedSlab, tfcProperty.getMeltTemp())
|
||||
.resultFluid(Fluid.of(outputMaterial.getFluid(), 72))
|
||||
.id(`tfc:heating/metal/${tfcMetalName}_block_slab`)
|
||||
}
|
||||
event.recipes.gtceu.macerator(`tfg:${material.getName()}_plated_slab`)
|
||||
.itemInputs(platedSlab)
|
||||
.itemOutputs(ChemicalHelper.get(TagPrefix.dustSmall, material, 2))
|
||||
.duration(material.getMass())
|
||||
.category(GTRecipeCategories.MACERATOR_RECYCLING)
|
||||
.EUt(GTValues.VA[GTValues.ULV])
|
||||
event.recipes.gtceu.arc_furnace(`tfg:${material.getName()}_plated_slab`)
|
||||
.itemInputs(platedSlab)
|
||||
.itemOutputs(ChemicalHelper.get(TagPrefix.nugget, material, 4))
|
||||
.duration(material.getMass())
|
||||
.category(GTRecipeCategories.ARC_FURNACE_RECYCLING)
|
||||
.EUt(GTValues.VA[GTValues.LV])
|
||||
|
||||
|
||||
event.shapeless(platedStair, ['#tfg:brick_stairs', plateItem, '#forge:tools/hammers'])
|
||||
.id(`tfg:item_application/${material.getName()}_plated_stair`)
|
||||
event.recipes.gtceu.assembler(`tfg:${material.getName()}_plated_stair`)
|
||||
.itemInputs('#tfg:brick_stairs', plateItem)
|
||||
.itemOutputs(platedStair)
|
||||
.circuit(10)
|
||||
.duration(50)
|
||||
.EUt(GTValues.VA[GTValues.ULV])
|
||||
|
||||
if (tfcProperty !== null) {
|
||||
event.recipes.tfc.heating(platedStair, tfcProperty.getMeltTemp())
|
||||
.resultFluid(Fluid.of(outputMaterial.getFluid(), 144))
|
||||
.id(`tfc:heating/metal/${tfcMetalName}_block_stairs`)
|
||||
}
|
||||
event.recipes.gtceu.macerator(`tfg:${material.getName()}_plated_stair`)
|
||||
.itemInputs(platedStair)
|
||||
.itemOutputs(ChemicalHelper.get(TagPrefix.dust, material, 1))
|
||||
.duration(material.getMass())
|
||||
.category(GTRecipeCategories.MACERATOR_RECYCLING)
|
||||
.EUt(GTValues.VA[GTValues.ULV])
|
||||
event.recipes.gtceu.arc_furnace(`tfg:${material.getName()}_plated_stair`)
|
||||
.itemInputs(platedStair)
|
||||
.itemOutputs(ChemicalHelper.get(TagPrefix.ingot, material, 1))
|
||||
.duration(material.getMass())
|
||||
.category(GTRecipeCategories.ARC_FURNACE_RECYCLING)
|
||||
.EUt(GTValues.VA[GTValues.LV])
|
||||
}
|
||||
//#endregion
|
||||
|
||||
//#region forEachMaterial
|
||||
/**
|
||||
* Function for iterating through registered materials
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue