neuralgia/kubejs/server_scripts/gregtech/utility.js
Pyritie 189f5aebce
Alpha Release: additions 0.9.0 (#880)
Signed-off-by: Pyritie <pyritie@gmail.com>
Signed-off-by: TomPlop <tomdidome@gmail.com>
Signed-off-by: Adora <adoradyne.58@gmail.com>
Signed-off-by: MetenBouldry <94766011+MetenBouldry@users.noreply.github.com>
Signed-off-by: CaitlynMC <135169224+CaitlynMC@users.noreply.github.com>
Signed-off-by: SverhRazum-Nah <leon.trol@mail.ru>
Signed-off-by: Redeix <59435925+Redeix@users.noreply.github.com>
Signed-off-by: Xikaro <55663835+Xikaro@users.noreply.github.com>
Co-authored-by: Xikaro <os.valerievich@ya.ru>
Co-authored-by: Nebby <78170922+Nebby1999@users.noreply.github.com>
Co-authored-by: Redeix <brayden.j.m.ford@gmail.com>
Co-authored-by: TomPlop <tomdidome@gmail.com>
Co-authored-by: aidie8 <aidenvanzuilen@gmail.com>
Co-authored-by: Xikaro <55663835+Xikaro@users.noreply.github.com>
Co-authored-by: Zleub <debray.arnaud@gmail.com>
Co-authored-by: Adora <adoradyne.58@gmail.com>
Co-authored-by: Curtis Merrill <curtis.r.merrill@gmail.com>
Co-authored-by: julia <97713533+juliakity@users.noreply.github.com>
Co-authored-by: GamerDadDave <gamerdaddave@gmail.com>
Co-authored-by: MetenBouldry <94766011+MetenBouldry@users.noreply.github.com>
Co-authored-by: CaitlynMC <135169224+CaitlynMC@users.noreply.github.com>
Co-authored-by: SverhRazum-Nah <leon.trol@mail.ru>
Co-authored-by: Redeix <59435925+Redeix@users.noreply.github.com>
Co-authored-by: Nebby1999 <nebby131999@gmail.com>
2025-04-18 14:49:56 +05:00

164 lines
No EOL
6 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// priority: 0
const generateMixerRecipe = (event, input, fluid_input, output, circuit, fluid_output, duration, EUt, rpm, id) => {
const recipe = event.recipes.gtceu.mixer(id)
.itemInputs(input)
.inputFluids(fluid_input)
.itemOutputs(output)
.outputFluids(fluid_output)
.duration(duration)
.EUt(EUt)
if (circuit != null) {
recipe.circuit(circuit)
}
}
const generateCutterRecipe = (event, input, output, duration, EUt, id) => {
event.recipes.gtceu.cutter(`tfg:${id}`)
.itemInputs(input)
.itemOutputs(output)
.duration(duration)
.EUt(EUt)
}
const generateGreenHouseRecipe = (event, input, fluid_amount, output, id) => {
// Без удобрения
event.recipes.gtceu.greenhouse(id)
.itemInputs(input)
.circuit(1)
.inputFluids(Fluid.of('minecraft:water', fluid_amount))
.itemOutputs(output)
.chancedOutput(input, 7500, 0)
.chancedOutput(input, 5000, 0)
.duration(36000) // 30 mins
.EUt(72)
// С удобрением
event.recipes.gtceu.greenhouse(`${id}_fertilized`)
.itemInputs(input)
.itemInputs('8x gtceu:fertilizer')
.circuit(2)
.inputFluids(Fluid.of('minecraft:water', fluid_amount))
.itemOutputs(output)
.chancedOutput(input, 8500, 0)
.chancedOutput(input, 6000, 0)
.duration(12000) // 10 mins
.EUt(196)
}
const getFillingNBT = (material, amount) => {
return {
tank: {
FluidName: Fluid.of(material.getFluid()).getId(),
Amount: amount
}
}
}
function generatePlatedBlockRecipe(event, material) {
// firmaciv plated blocks don't have this property
let tfcProperty = material.getProperty(TFGPropertyKey.TFC_PROPERTY)
let outputMaterial = (tfcProperty == null || tfcProperty.getOutputMaterial() == null) ? material : tfcProperty.getOutputMaterial()
let plateItem = ChemicalHelper.get(TagPrefix.plate, material, 1);
let platedBlock = ChemicalHelper.get(TFGTagPrefix.blockPlated, material, 1);
let platedSlab = ChemicalHelper.get(TFGTagPrefix.slabPlated, material, 1);
let platedStair = ChemicalHelper.get(TFGTagPrefix.stairPlated, material, 1);
let tfcMetalName = material.getName();
if (tfcMetalName == "iron")
tfcMetalName = "cast_iron";
event.recipes.create.item_application(platedBlock, ['#forge:stone_bricks', plateItem])
.id(`tfg:item_application/${material.getName()}_plated_block`)
event.recipes.createDeploying(platedBlock, ['#forge:stone_bricks', plateItem])
.id(`tfg:deploying/${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), 'gtceu:stone_dust')
.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), 'gtceu:ash_dust')
.duration(material.getMass())
.category(GTRecipeCategories.ARC_FURNACE_RECYCLING)
.EUt(GTValues.VA[GTValues.LV])
event.recipes.create.item_application(platedSlab, ['#tfg:brick_slabs', plateItem])
.id(`tfg:item_application/${material.getName()}_plated_slab`)
event.recipes.createDeploying(platedSlab, ['#tfg:brick_slabs', plateItem])
.id(`tfg:deploying/${material.getName()}_plated_slab`)
event.recipes.gtceu.assembler(`tfg:${material.getName()}_plated_slab`)
.itemInputs('#tfg:brick_slabs', plateItem)
.itemOutputs(platedSlab)
.circuit(10)
.duration(50)
.EUt(GTValues.VA[GTValues.ULV])
if (tfcProperty != null) {
event.recipes.tfc.heating(platedSlab, tfcProperty.getMeltTemp())
.resultFluid(Fluid.of(outputMaterial.getFluid(), 144))
.id(`tfc:heating/metal/${tfcMetalName}_block_slab`)
}
event.recipes.gtceu.macerator(`tfg:${material.getName()}_plated_slab`)
.itemInputs(platedSlab)
.itemOutputs(ChemicalHelper.get(TagPrefix.dust, material, 1), 'gtceu:small_stone_dust')
.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.ingot, material, 1), 'gtceu:small_ash_dust')
.duration(material.getMass())
.category(GTRecipeCategories.ARC_FURNACE_RECYCLING)
.EUt(GTValues.VA[GTValues.LV])
event.recipes.create.item_application(platedStair, ['#tfg:brick_stairs', plateItem])
.id(`tfg:item_application/${material.getName()}_plated_stair`)
event.recipes.createDeploying(platedStair, ['#tfg:brick_stairs', plateItem])
.id(`tfg:deploying/${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), 'gtceu:stone_dust')
.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), 'gtceu:ash_dust')
.duration(material.getMass())
.category(GTRecipeCategories.ARC_FURNACE_RECYCLING)
.EUt(GTValues.VA[GTValues.LV])
}