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
|
|
@ -8,55 +8,11 @@
|
|||
const registerTFCRecipes = (event) => {
|
||||
|
||||
removeTFCRecipes(event)
|
||||
registerTFCMaterialsRecipes(event)
|
||||
registerTFCMetalsRecipes(event)
|
||||
registerTFCDyeRecipes(event)
|
||||
|
||||
// Добавление рецептов
|
||||
const TFC_QUERN_POWDER_RECIPE_COMPONENTS = /** @type {const} */ ([
|
||||
{ input: "#forge:dusts/coke", output: "4x tfc:powder/coke", name: "coke_powder" },
|
||||
{ input: "#forge:dusts/amethyst", output: "4x tfc:powder/amethyst", name: "amethyst_powder" },
|
||||
{ input: "#forge:dusts/diamond", output: "4x tfc:powder/diamond", name: "diamond_powder" },
|
||||
{ input: "#forge:dusts/emerald", output: "4x tfc:powder/emerald", name: "emerald_powder" },
|
||||
{ input: "#forge:dusts/lapis", output: "4x tfc:powder/lapis_lazuli", name: "lapis_powder" },
|
||||
{ input: "#forge:dusts/opal", output: "4x tfc:powder/opal", name: "opal_powder" },
|
||||
{ input: "#forge:dusts/pyrite", output: "4x tfc:powder/pyrite", name: "pyrite_powder" },
|
||||
{ input: "#forge:dusts/ruby", output: "4x tfc:powder/ruby", name: "ruby_powder" },
|
||||
{ input: "#forge:dusts/sapphire", output: "4x tfc:powder/sapphire", name: "sapphire_powder" },
|
||||
{ input: "#forge:dusts/topaz", output: "4x tfc:powder/topaz", name: "topaz_powder" },
|
||||
{ input: "#forge:dusts/gold", output: "4x tfc:powder/native_gold", name: "gold_powder" },
|
||||
{ input: "#forge:dusts/silver", output: "4x tfc:powder/native_silver", name: "silver_powder" },
|
||||
{ input: "#forge:dusts/copper", output: "4x tfc:powder/native_copper", name: "copper_powder" },
|
||||
{ input: "#forge:dusts/cassiterite", output: "4x tfc:powder/cassiterite", name: "cassiterite_powder" },
|
||||
{ input: "#forge:dusts/bismuth", output: "4x tfc:powder/bismuthinite", name: "bismuth_powder" },
|
||||
{ input: "#forge:dusts/garnierite", output: "4x tfc:powder/garnierite", name: "garnierite_powder" },
|
||||
{ input: "#forge:dusts/sphalerite", output: "4x tfc:powder/sphalerite", name: "sphalerite_powder" },
|
||||
{ input: "#forge:dusts/magnetite", output: "4x tfc:powder/magnetite", name: "magnetite_powder" },
|
||||
{ input: "#forge:dusts/tetrahedrite", output: "4x tfc:powder/tetrahedrite", name: "tetrahedrite_powder" },
|
||||
{ input: "#forge:dusts/malachite", output: "4x tfc:powder/malachite", name: "malachite_powder" },
|
||||
{ input: "#forge:dusts/yellow_limonite", output: "4x tfc:powder/limonite", name: "limonite_powder" },
|
||||
{ input: "#forge:dusts/hematite", output: "4x tfc:powder/hematite", name: "hematite_powder" },
|
||||
{ input: "#forge:dusts/sulfur", output: "4x tfc:powder/sulfur", name: "sulfur_powder" },
|
||||
{ input: "#forge:dusts/saltpeter", output: "4x tfc:powder/saltpeter", name: "saltpeter_powder" },
|
||||
{ input: "#forge:dusts/salt", output: "4x tfc:powder/salt", name: "salt_powder" },
|
||||
{ input: "#forge:dusts/rock_salt", output: "4x tfc:powder/sylvite", name: "rock_salt" },
|
||||
{ input: "#forge:dusts/graphite", output: "4x tfc:powder/graphite", name: "graphite_powder" },
|
||||
{ input: "#forge:dusts/borax", output: "4x tfc:powder/flux", name: "flux_powder" },
|
||||
{ input: "#forge:dusts/soda_ash", output: "4x tfc:powder/soda_ash", name: "soda_ash" },
|
||||
{ input: "#forge:dusts/charcoal", output: "4x tfc:powder/charcoal", name: "charcoal" },
|
||||
{ input: "tfc:ore/sylvite", output: "4x tfc:powder/sylvite", name: "sylvite" },
|
||||
]);
|
||||
event.remove({ mod: 'tfc', type: 'tfc:casting' });
|
||||
|
||||
TFC_QUERN_POWDER_RECIPE_COMPONENTS.forEach(element => {
|
||||
event.recipes.gtceu.macerator(`tfg:${element.name}`)
|
||||
.itemInputs(element.input)
|
||||
.itemOutputs(element.output)
|
||||
.duration(60)
|
||||
.EUt(2)
|
||||
|
||||
event.recipes.tfc.quern(element.output, element.input)
|
||||
.id(`tfg:quern/${element.name}`)
|
||||
})
|
||||
// Доменная печь
|
||||
event.recipes.gtceu.shaped('tfc:blast_furnace', [
|
||||
'AAA',
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -48,68 +48,6 @@ function registerTFCMetalsRecipes(event) {
|
|||
|
||||
//#endregion
|
||||
|
||||
|
||||
//#region Фикс рецептов колоколов
|
||||
|
||||
//#region Из золота
|
||||
|
||||
event.recipes.tfc.casting(`minecraft:bell`, 'tfc:ceramic/bell_mold', Fluid.of('gtceu:gold', 144), 1)
|
||||
.id(`tfc:casting/gold_bell`)
|
||||
|
||||
event.recipes.tfc.heating(`minecraft:bell`, 1060)
|
||||
.resultFluid(Fluid.of('gtceu:gold', 144))
|
||||
.id(`tfc:heating/gold_bell`)
|
||||
|
||||
event.recipes.create.filling(
|
||||
Item.of('tfc:ceramic/bell_mold', getFillingNBT(GTMaterials.Gold, 144)),
|
||||
[
|
||||
Fluid.of(GTMaterials.Gold.getFluid(), 144),
|
||||
Item.of('tfc:ceramic/bell_mold').strongNBT()
|
||||
]
|
||||
).id(`tfg:tfc/filling/${GTMaterials.Gold.getName()}_bell_mold`)
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region Из латуни
|
||||
|
||||
event.recipes.tfc.casting(`tfc:brass_bell`, 'tfc:ceramic/bell_mold', Fluid.of('gtceu:brass', 144), 1)
|
||||
.id(`tfc:casting/brass_bell`)
|
||||
|
||||
event.recipes.tfc.heating(`tfc:brass_bell`, 930)
|
||||
.resultFluid(Fluid.of('gtceu:brass', 144))
|
||||
.id(`tfc:heating/brass_bell`)
|
||||
|
||||
event.recipes.create.filling(
|
||||
Item.of('tfc:ceramic/bell_mold', getFillingNBT(GTMaterials.Brass, 144)),
|
||||
[
|
||||
Fluid.of(GTMaterials.Brass.getFluid(), 144),
|
||||
Item.of('tfc:ceramic/bell_mold').strongNBT()
|
||||
]
|
||||
).id(`tfg:tfc/filling/${GTMaterials.Brass.getName()}_bell_mold`)
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region Из бронзы
|
||||
|
||||
event.recipes.tfc.casting(`tfc:bronze_bell`, 'tfc:ceramic/bell_mold', Fluid.of('gtceu:bronze', 144), 1)
|
||||
.id(`tfc:casting/bronze_bell`)
|
||||
|
||||
event.recipes.tfc.heating(`tfc:bronze_bell`, 930)
|
||||
.resultFluid(Fluid.of('gtceu:bronze', 144))
|
||||
.id(`tfc:heating/bronze_bell`)
|
||||
|
||||
event.recipes.create.filling(
|
||||
Item.of('tfc:ceramic/bell_mold', getFillingNBT(GTMaterials.Bronze, 144)),
|
||||
[
|
||||
Fluid.of(GTMaterials.Bronze.getFluid(), 144),
|
||||
Item.of('tfc:ceramic/bell_mold').strongNBT()
|
||||
]
|
||||
).id(`tfg:tfc/filling/${GTMaterials.Bronze.getName()}_bell_mold`)
|
||||
|
||||
//#endregion
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region Рецепты ковки TFC слитков в GT машинах
|
||||
|
||||
// Сырая крица -> Укрепленная крица
|
||||
|
|
@ -162,6 +100,8 @@ function registerTFCMetalsRecipes(event) {
|
|||
.EUt(4)
|
||||
|
||||
// Слабая сталь + Чугун -> Высокоуглеродная черная сталь
|
||||
event.recipes.tfc.welding('tfc:metal/ingot/high_carbon_black_steel', 'tfc:metal/ingot/weak_steel', 'tfc:metal/ingot/pig_iron', 4)
|
||||
|
||||
event.recipes.greate.compacting('tfc:metal/ingot/high_carbon_black_steel',
|
||||
['tfc:metal/ingot/weak_steel', 'tfc:metal/ingot/pig_iron', 'tfc:powder/flux'])
|
||||
.heated()
|
||||
|
|
@ -175,6 +115,8 @@ function registerTFCMetalsRecipes(event) {
|
|||
.EUt(4)
|
||||
|
||||
// Слабая синяя сталь + Черная сталь -> Высокоуглеродная синяя сталь
|
||||
event.recipes.tfc.welding('tfc:metal/ingot/high_carbon_blue_steel', 'tfc:metal/ingot/weak_blue_steel', 'tfc:metal/ingot/black_steel', 5)
|
||||
|
||||
event.recipes.greate.compacting('tfc:metal/ingot/high_carbon_blue_steel',
|
||||
['tfc:metal/ingot/weak_blue_steel', 'tfc:metal/ingot/black_steel', 'tfc:powder/flux'])
|
||||
.heated()
|
||||
|
|
@ -188,6 +130,8 @@ function registerTFCMetalsRecipes(event) {
|
|||
.EUt(4)
|
||||
|
||||
// Слабая красная сталь + Черная сталь -> Высокоуглеродная красная сталь
|
||||
event.recipes.tfc.welding('tfc:metal/ingot/high_carbon_red_steel', 'tfc:metal/ingot/weak_red_steel', 'tfc:metal/ingot/black_steel', 5)
|
||||
|
||||
event.recipes.greate.compacting('tfc:metal/ingot/high_carbon_red_steel',
|
||||
['tfc:metal/ingot/weak_red_steel', 'tfc:metal/ingot/black_steel', 'tfc:powder/flux'])
|
||||
.heated()
|
||||
|
|
@ -370,33 +314,4 @@ function registerTFCMetalsRecipes(event) {
|
|||
|
||||
event.smelting('minecraft:iron_ingot', '#forge:ingots/wrought_iron')
|
||||
.id('tfg:revert_wrought_iron_ingot')
|
||||
|
||||
|
||||
// Melting powders
|
||||
|
||||
const METAL_POWDERS = [
|
||||
{ powder: 'tfc:powder/native_copper', material: GTMaterials.Copper },
|
||||
{ powder: 'tfc:powder/native_gold', material: GTMaterials.Gold },
|
||||
{ powder: 'tfc:powder/hematite', material: GTMaterials.Hematite },
|
||||
{ powder: 'tfc:powder/native_silver', material: GTMaterials.Silver },
|
||||
{ powder: 'tfc:powder/cassiterite', material: GTMaterials.Cassiterite },
|
||||
{ powder: 'tfc:powder/bismuthinite', material: GTMaterials.Bismuth },
|
||||
{ powder: 'tfc:powder/garnierite', material: GTMaterials.Garnierite },
|
||||
{ powder: 'tfc:powder/malachite', material: GTMaterials.Malachite },
|
||||
{ powder: 'tfc:powder/magnetite', material: GTMaterials.Magnetite },
|
||||
{ powder: 'tfc:powder/limonite', material: GTMaterials.YellowLimonite },
|
||||
{ powder: 'tfc:powder/sphalerite', material: GTMaterials.Sphalerite },
|
||||
{ powder: 'tfc:powder/tetrahedrite', material: GTMaterials.Tetrahedrite },
|
||||
{ powder: 'tfc:powder/pyrite', material: GTMaterials.Pyrite }
|
||||
]
|
||||
|
||||
METAL_POWDERS.forEach(x => {
|
||||
const tfcProperty = x.material.getProperty(TFGPropertyKey.TFC_PROPERTY)
|
||||
|
||||
let outputMaterial = (tfcProperty.getOutputMaterial() === null) ? x.material : tfcProperty.getOutputMaterial()
|
||||
|
||||
event.recipes.tfc.heating(x.powder, tfcProperty.getMeltTemp())
|
||||
.resultFluid(Fluid.of(outputMaterial.getFluid(), global.calcAmountOfMetalProcessed(36, tfcProperty.getPercentOfMaterial())))
|
||||
.id(`tfg:heating/powder/${x.material.getName()}`)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,58 +3,47 @@
|
|||
|
||||
function removeTFCRecipes(event) {
|
||||
|
||||
// Удаление рецептов руд TFC
|
||||
event.remove({ id: /tfc:heating\/ore\/poor_*/ })
|
||||
event.remove({ id: /tfc:heating\/ore\/normal_*/ })
|
||||
event.remove({ id: /tfc:heating\/ore\/rich_*/ })
|
||||
global.TFC_DISABLED_ITEMS.forEach(item => {
|
||||
event.remove({ input: item })
|
||||
event.remove({ output: item })
|
||||
})
|
||||
|
||||
event.remove({ mod: 'tfc', type: 'tfc:welding' })
|
||||
event.remove({ id: /tfc:heating\/metal\/*/ })
|
||||
event.remove({ id: /tfc:heating\/ore\/*/ })
|
||||
|
||||
// Удаление рецептов блоков
|
||||
event.remove({ id: /tfc:crafting\/metal\/block\/*/ })
|
||||
event.remove({ id: /tfc:heating\/metal\/*_block/ })
|
||||
|
||||
// Удаление рецептов ступеней
|
||||
event.remove({ id: /tfc:crafting\/metal\/block\/*_stairs/ })
|
||||
event.remove({ id: /tfc:heating\/metal\/*_block_stairs/ })
|
||||
|
||||
// Удалание рецептов полублоков
|
||||
event.remove({ id: /tfc:crafting\/metal\/block\/*_slab/ })
|
||||
event.remove({ id: /tfc:heating\/metal\/*_block_slab/ })
|
||||
|
||||
//#region Удаление рецептов для предметов из Cast Iron
|
||||
|
||||
// Блок
|
||||
event.remove({ id: `tfc:crafting/metal/block/cast_iron` })
|
||||
event.remove({ id: `tfc:heating/metal/cast_iron_block` })
|
||||
|
||||
// Ступень
|
||||
event.remove({ id: `tfc:crafting/metal/block/cast_iron_stairs` })
|
||||
event.remove({ id: `tfc:heating/metal/cast_iron_block_stairs` })
|
||||
|
||||
// Полублок
|
||||
event.remove({ id: `tfc:crafting/metal/block/cast_iron_slab` })
|
||||
event.remove({ id: `tfc:heating/metal/cast_iron_block_slab` })
|
||||
|
||||
// Слиток
|
||||
event.remove({ id: `tfc:casting/cast_iron_ingot` })
|
||||
event.remove({ id: `tfc:casting/cast_iron_fire_ingot` })
|
||||
event.remove({ id: `tfc:heating/metal/cast_iron_ingot` })
|
||||
event.remove({ id: `tfc:welding/cast_iron_double_ingot` })
|
||||
event.remove({ id: `tfc:anvil/cast_iron_rod` })
|
||||
|
||||
// Двойной слиток
|
||||
event.remove({ id: `tfc:heating/metal/cast_iron_double_ingot` })
|
||||
event.remove({ id: `tfc:anvil/cast_iron_sheet` })
|
||||
|
||||
// Пластина
|
||||
event.remove({ id: `tfc:heating/metal/cast_iron_sheet` })
|
||||
event.remove({ id: `tfc:welding/cast_iron_double_sheet` })
|
||||
|
||||
// Двойная пластина
|
||||
event.remove({ id: `tfc:heating/metal/cast_iron_double_sheet` })
|
||||
|
||||
// Стержень
|
||||
event.remove({ id: `tfc:heating/metal/cast_iron_rod` })
|
||||
|
||||
//#endregion
|
||||
|
||||
|
||||
|
|
@ -73,6 +62,18 @@ function removeTFCRecipes(event) {
|
|||
event.remove({ id: 'tfc:quern/graphite' })
|
||||
event.remove({ id: 'tfc:quern/lapis_lazuli' })
|
||||
event.remove({ id: 'tfc:quern/lapis_lazuli_cut' })
|
||||
event.remove({ id: 'tfc:quern/small_bismuthinite' })
|
||||
event.remove({ id: 'tfc:quern/small_cassiterite' })
|
||||
event.remove({ id: 'tfc:quern/small_garnierite' })
|
||||
event.remove({ id: 'tfc:quern/small_hematite' })
|
||||
event.remove({ id: 'tfc:quern/small_limonite' })
|
||||
event.remove({ id: 'tfc:quern/small_magnetite' })
|
||||
event.remove({ id: 'tfc:quern/small_malachite' })
|
||||
event.remove({ id: 'tfc:quern/small_native_copper' })
|
||||
event.remove({ id: 'tfc:quern/small_native_gold' })
|
||||
event.remove({ id: 'tfc:quern/small_native_silver' })
|
||||
event.remove({ id: 'tfc:quern/small_sphalerite' })
|
||||
event.remove({ id: 'tfc:quern/small_tetrahedrite' })
|
||||
event.remove({ id: 'tfc:quern/normal_bismuthinite' })
|
||||
event.remove({ id: 'tfc:quern/normal_cassiterite' })
|
||||
event.remove({ id: 'tfc:quern/normal_garnierite' })
|
||||
|
|
@ -145,7 +146,7 @@ function removeTFCRecipes(event) {
|
|||
event.remove({ id: `tfc:crafting/crankshaft` })
|
||||
event.remove({ id: 'tfc:crafting/sandpaper' })
|
||||
event.remove({ id: 'tfc:crafting/vanilla/redstone/observer' })
|
||||
|
||||
event.remove({ id: 'tfc:crafting/vanilla/brick_stairs' })
|
||||
event.remove({ id: 'tfc:crafting/vanilla/redstone/steel_minecart' })
|
||||
event.remove({ id: 'tfc:crafting/vanilla/redstone/minecart' })
|
||||
event.remove({ id: 'tfc:crafting/cake' })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue