migrate everything over to linuxUnfucker()
This commit is contained in:
parent
e74043472d
commit
241b80a4a0
14 changed files with 162 additions and 94 deletions
|
|
@ -500,28 +500,28 @@ function sterilizeItem(event, input, output, multiplier, cleanroom) {
|
|||
}
|
||||
|
||||
// Create recipes.
|
||||
const ethanol_recipe = event.recipes.gtceu.chemical_bath(`tfg:ethanol_cleaning/${input.replace(':', '_')}_to_${output.replace(':', '_')}`)
|
||||
const ethanol_recipe = event.recipes.gtceu.chemical_bath(`tfg:ethanol_cleaning/${linuxUnfucker(input)}_to_${linuxUnfucker(output)}`)
|
||||
.itemInputs(input)
|
||||
.inputFluids(Fluid.of('gtceu:ethanol', 500*recipe_multiplier))
|
||||
.itemOutputs(output)
|
||||
.duration(10*20*recipe_multiplier)
|
||||
.EUt(GTValues.VA[GTValues.MV]);
|
||||
|
||||
const hydrogen_peroxide_recipe = event.recipes.gtceu.chemical_bath(`tfg:hydrogen_peroxide_cleaning/${input.replace(':', '_')}_to_${output.replace(':', '_')}`)
|
||||
const hydrogen_peroxide_recipe = event.recipes.gtceu.chemical_bath(`tfg:hydrogen_peroxide_cleaning/${linuxUnfucker(input)}_to_${linuxUnfucker(output)}`)
|
||||
.itemInputs(input)
|
||||
.inputFluids(Fluid.of('gtceu:hydrogen_peroxide', 200*recipe_multiplier))
|
||||
.itemOutputs(output)
|
||||
.duration(10*20*recipe_multiplier)
|
||||
.EUt(GTValues.VA[GTValues.MV]);
|
||||
|
||||
const sodium_dodecyl_sulfate_recipe = event.recipes.gtceu.chemical_bath(`tfg:sodium_dodecyl_sulfate_cleaning/${input.replace(':', '_')}_to_${output.replace(':', '_')}`)
|
||||
const sodium_dodecyl_sulfate_recipe = event.recipes.gtceu.chemical_bath(`tfg:sodium_dodecyl_sulfate_cleaning/${linuxUnfucker(input)}_to_${linuxUnfucker(output)}`)
|
||||
.itemInputs(input)
|
||||
.inputFluids(Fluid.of('tfg:sodium_dodecyl_sulfate', 50*recipe_multiplier))
|
||||
.itemOutputs(output)
|
||||
.duration(10*20*recipe_multiplier)
|
||||
.EUt(GTValues.VA[GTValues.MV]);
|
||||
|
||||
const autoclave_recipe = event.recipes.gtceu.autoclave(`tfg:autoclave_cleaning/${input.replace(':', '_')}_to_${output.replace(':', '_')}`)
|
||||
const autoclave_recipe = event.recipes.gtceu.autoclave(`tfg:autoclave_cleaning/${linuxUnfucker(input)}_to_${linuxUnfucker(output)}`)
|
||||
.itemInputs(input)
|
||||
.perTick(true)
|
||||
.inputFluids(Fluid.of('gtceu:steam', 100*recipe_multiplier))
|
||||
|
|
|
|||
|
|
@ -199,6 +199,13 @@ GTCEuServerEvents.fluidVeins(event => {
|
|||
registerGTCEUBedrockFluidVeins(event)
|
||||
})
|
||||
|
||||
|
||||
/** Correct recipe IDs to replace invalid characters */
|
||||
function linuxUnfucker(value) {
|
||||
const str = (value === undefined || value === null) ? "" : value.toString();
|
||||
return str.replace(/[/:\s]/g, "_");
|
||||
};
|
||||
|
||||
/**
|
||||
* Событие регистрации рецептов.
|
||||
* Срабатывает после инициализации датапаков и тегов.
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ const registerModernMarkingRecipes = (event) => {
|
|||
markings.forEach(item => {
|
||||
event.stonecutting(item,
|
||||
Ingredient.of('#ags_modernmarkings:markings').subtract(item)
|
||||
).id(`tfg:stonecutter/${item.replace(/:/g, "/")}`)
|
||||
).id(`tfg:stonecutter/${linuxUnfucker(item)}`)
|
||||
|
||||
event.stonecutting(item, 'ags_modernmarkings:wall_marking_hazard_diamond')
|
||||
.id(`tfg:stonecutter/${item.replace(/:/g, "/")}_from_diamond`)
|
||||
.id(`tfg:stonecutter/${linuxUnfucker(item)}_from_diamond`)
|
||||
})
|
||||
};
|
||||
|
|
@ -18,7 +18,7 @@ const registerSoulboundRecipes = (event) => {
|
|||
}
|
||||
result.nbt.put('soulbindingSoulboundItems', true)
|
||||
return result;
|
||||
}).id(`tfg:soulbind_${x.equipment}`.replace(/[: ]/g, '_'));
|
||||
}).id(`tfg:soulbind_${linuxUnfucker(x.equipment)}`);
|
||||
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -46,12 +46,6 @@ const greenhouse_dimension_index = [
|
|||
|
||||
//#region Utility Script
|
||||
|
||||
/** Correct recipe IDs to replace invalid characters */
|
||||
function linuxUnfucker(value) {
|
||||
const str = (value === undefined || value === null) ? "" : value.toString();
|
||||
return str.replace(/[/:\s]/g, "_");
|
||||
};
|
||||
|
||||
/**
|
||||
* Function for generating greenhouse recipes.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ const registerTFGPiscicultureRecipes = (event) => {
|
|||
Item.of(`3x tfg:fish_roe`, {"mob_type": fish.id}).strongNBT(),
|
||||
'2x minecraft:bucket'
|
||||
],
|
||||
`${fish.id.replace(/[/:\s]/g, "_")}/basic_food/bucket_to_roe`
|
||||
`${linuxUnfucker(fish.id)}/basic_food/bucket_to_roe`
|
||||
);
|
||||
|
||||
generatePiscicultureRecipe(event,
|
||||
|
|
@ -158,7 +158,7 @@ const registerTFGPiscicultureRecipes = (event) => {
|
|||
Item.of(`4x tfg:fish_roe`, {"mob_type": fish.id}).strongNBT(),
|
||||
'2x minecraft:bucket'
|
||||
],
|
||||
`${fish.id.replace(/[/:\s]/g, "_")}/advanced_food/bucket_to_roe`
|
||||
`${linuxUnfucker(fish.id)}/advanced_food/bucket_to_roe`
|
||||
);
|
||||
} else {
|
||||
generatePiscicultureRecipe(event,
|
||||
|
|
@ -170,7 +170,7 @@ const registerTFGPiscicultureRecipes = (event) => {
|
|||
`6x ${fish.item}`,
|
||||
Item.of(`3x tfg:fish_roe`, {"mob_type": fish.id}).strongNBT()
|
||||
],
|
||||
`${fish.id.replace(/[/:\s]/g, "_")}/basic_food/parent_to_roe`
|
||||
`${linuxUnfucker(fish.id)}/basic_food/parent_to_roe`
|
||||
);
|
||||
|
||||
generatePiscicultureRecipe(event,
|
||||
|
|
@ -182,7 +182,7 @@ const registerTFGPiscicultureRecipes = (event) => {
|
|||
`12x ${fish.item}`,
|
||||
Item.of(`4x tfg:fish_roe`, {"mob_type": fish.id}).strongNBT()
|
||||
],
|
||||
`${fish.id.replace(/[/:\s]/g, "_")}/advanced_food/parent_to_roe`
|
||||
`${linuxUnfucker(fish.id)}/advanced_food/parent_to_roe`
|
||||
);
|
||||
};
|
||||
|
||||
|
|
@ -196,7 +196,7 @@ const registerTFGPiscicultureRecipes = (event) => {
|
|||
`10x ${fish.item}`,
|
||||
Item.of(`4x tfg:fish_roe`, {"mob_type": fish.id}).strongNBT()
|
||||
],
|
||||
`${fish.id.replace(/[/:\s]/g, "_")}/basic_food/roe_to_roe`
|
||||
`${linuxUnfucker(fish.id)}/basic_food/roe_to_roe`
|
||||
);
|
||||
|
||||
generatePiscicultureRecipe(event,
|
||||
|
|
@ -208,7 +208,7 @@ const registerTFGPiscicultureRecipes = (event) => {
|
|||
`15x ${fish.item}`,
|
||||
Item.of(`5x tfg:fish_roe`, {"mob_type": fish.id}).strongNBT()
|
||||
],
|
||||
`${fish.id.replace(/[/:\s]/g, "_")}/advanced_food/roe_to_roe`
|
||||
`${linuxUnfucker(fish.id)}/advanced_food/roe_to_roe`
|
||||
);
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -418,7 +418,7 @@ function registerTFGFoodRecipes(event) {
|
|||
const brining_ingredients = smoking_meats.concat(brining_veg);
|
||||
|
||||
brining_ingredients.forEach(item => {
|
||||
global.processorRecipeText(event, `${item.replace(/:/g, "/")}/brining`, 200, 16, "tfg.food_recipe.brining", {
|
||||
global.processorRecipeText(event, `${linuxUnfucker(item)}/brining`, 200, 16, "tfg.food_recipe.brining", {
|
||||
circuit: 5,
|
||||
itemInputs: [item],
|
||||
itemOutputs: [item],
|
||||
|
|
@ -428,7 +428,7 @@ function registerTFGFoodRecipes(event) {
|
|||
})
|
||||
|
||||
smoking_meats.forEach(item => {
|
||||
global.processorRecipeText(event, `${item.replace(/:/g, "/")}/smoking`, 200, 16, "tfg.food_recipe.smoking", {
|
||||
global.processorRecipeText(event, `${linuxUnfucker(item)}/smoking`, 200, 16, "tfg.food_recipe.smoking", {
|
||||
circuit: 6,
|
||||
itemInputs: [item],
|
||||
itemOutputs: [item],
|
||||
|
|
@ -438,7 +438,7 @@ function registerTFGFoodRecipes(event) {
|
|||
})
|
||||
|
||||
smoking_cheese.forEach(item => {
|
||||
global.processorRecipeText(event, `${item.replace(/:/g, "/")}/smoking`, 200, 16, "tfg.food_recipe.smoking", {
|
||||
global.processorRecipeText(event, `${linuxUnfucker(item)}/smoking`, 200, 16, "tfg.food_recipe.smoking", {
|
||||
circuit: 6,
|
||||
itemInputs: [item],
|
||||
itemOutputs: [item],
|
||||
|
|
@ -448,7 +448,7 @@ function registerTFGFoodRecipes(event) {
|
|||
})
|
||||
|
||||
drying_fruits.forEach(item => {
|
||||
global.processorRecipeText(event, `${item.replace(/:/g, "/")}/drying`, 200, 16, "tfg.food_recipe.drying", {
|
||||
global.processorRecipeText(event, `${linuxUnfucker(item)}/drying`, 200, 16, "tfg.food_recipe.drying", {
|
||||
circuit: 6,
|
||||
itemInputs: [item],
|
||||
itemOutputs: [item],
|
||||
|
|
@ -458,7 +458,7 @@ function registerTFGFoodRecipes(event) {
|
|||
})
|
||||
|
||||
drying_recipes.forEach(item => {
|
||||
global.processorRecipeText(event, `${item.input.replace(/:/g, "/")}/drying`, 200, 16, "tfg.food_recipe.drying", {
|
||||
global.processorRecipeText(event, `${linuxUnfucker(item.input)}/drying`, 200, 16, "tfg.food_recipe.drying", {
|
||||
circuit: 6,
|
||||
itemInputs: [item.input],
|
||||
itemOutputs: [item.output],
|
||||
|
|
@ -958,7 +958,7 @@ function registerTFGFoodRecipes(event) {
|
|||
//#region Alcohols
|
||||
|
||||
global.TFC_ALCOHOL.forEach(alcohol => {
|
||||
global.processorRecipe(event, alcohol.id.replace(/:/g, "_"), 2400, 1, {
|
||||
global.processorRecipe(event, linuxUnfucker(alcohol.id), 2400, 1, {
|
||||
itemInputs: [alcohol.ingredient],
|
||||
fluidInputs: ['#tfg:clean_water 500', 'firmalife:yeast_starter 10'],
|
||||
fluidOutputs: [Fluid.of(alcohol.id, 500)],
|
||||
|
|
@ -1424,7 +1424,7 @@ function registerTFGFoodRecipes(event) {
|
|||
*/
|
||||
const beer = ['tfc:beer', 'tfcagedalcohol:aged_beer'];
|
||||
beer.forEach(beerType => {
|
||||
global.processorRecipe(event, `raw_beer_battered_cheese_curds/${beerType.replace(':', '_')}`, 20*5, GTValues.VA[GTValues.ULV], {
|
||||
global.processorRecipe(event, `raw_beer_battered_cheese_curds/${linuxUnfucker(beerType)}`, 20*5, GTValues.VA[GTValues.ULV], {
|
||||
itemInputs: ['4x #tfg:foods/cheese_curds', '#tfc:foods/flour', 'tfc:powder/salt', '#forge:eggs'],
|
||||
fluidInputs: [`${beerType} 100`],
|
||||
itemOutputs: ['4x tfg:food/raw_beer_battered_cheese_curds'],
|
||||
|
|
@ -1714,9 +1714,9 @@ function registerTFGFoodRecipes(event) {
|
|||
spice.plant,
|
||||
'#forge:tools/knives'
|
||||
]
|
||||
).id(`tfg:crafting/${spice.product.replace(':', '_')}`);
|
||||
).id(`tfg:crafting/${linuxUnfucker(spice.product)}`);
|
||||
|
||||
event.recipes.gtceu.food_processor(`tfg:${spice.product.replace(':', '_')}`)
|
||||
event.recipes.gtceu.food_processor(`tfg:${linuxUnfucker(spice.product)}`)
|
||||
.itemInputs(spice.plant)
|
||||
.itemOutputs(Item.of(spice.product).withCount(2))
|
||||
.duration(10)
|
||||
|
|
|
|||
|
|
@ -281,21 +281,21 @@ function registerTFGMoldRecipes(event) {
|
|||
|
||||
global.TFG_EXTRUDER_MOLDS.forEach(mold => {
|
||||
|
||||
event.recipes.gtceu.arc_furnace(`arc_${mold}`.replace("tfg:", ""))
|
||||
event.recipes.gtceu.arc_furnace(`arc_${linuxUnfucker(mold)}`)
|
||||
.itemInputs(mold)
|
||||
.itemOutputs(steelIngots)
|
||||
.duration(224)
|
||||
.EUt(GTValues.VA[GTValues.LV])
|
||||
.category(GTRecipeCategories.ARC_FURNACE_RECYCLING)
|
||||
|
||||
event.recipes.gtceu.macerator(`macerate_${mold}`.replace("tfg:", ""))
|
||||
event.recipes.gtceu.macerator(`macerate_${linuxUnfucker(mold)}`)
|
||||
.itemInputs(mold)
|
||||
.itemOutputs(steelDusts)
|
||||
.duration(224)
|
||||
.EUt(GTValues.VA[GTValues.ULV])
|
||||
.category(GTRecipeCategories.MACERATOR_RECYCLING)
|
||||
|
||||
event.recipes.gtceu.forming_press(`copy_shape_${mold}`.replace("tfg:", ""))
|
||||
event.recipes.gtceu.forming_press(`copy_shape_${linuxUnfucker(mold)}`)
|
||||
.itemInputs('gtceu:empty_mold')
|
||||
.notConsumable(mold)
|
||||
.itemOutputs(mold)
|
||||
|
|
@ -305,21 +305,21 @@ function registerTFGMoldRecipes(event) {
|
|||
|
||||
global.TFG_CASTING_MOLDS.forEach(mold => {
|
||||
|
||||
event.recipes.gtceu.arc_furnace(`arc_${mold}`.replace("tfg:", ""))
|
||||
event.recipes.gtceu.arc_furnace(`arc_${linuxUnfucker(mold)}`)
|
||||
.itemInputs(mold)
|
||||
.itemOutputs(steelIngots)
|
||||
.duration(224)
|
||||
.EUt(GTValues.VA[GTValues.LV])
|
||||
.category(GTRecipeCategories.ARC_FURNACE_RECYCLING)
|
||||
|
||||
event.recipes.gtceu.macerator(`macerate_${mold}`.replace("tfg:", ""))
|
||||
event.recipes.gtceu.macerator(`macerate_${linuxUnfucker(mold)}`)
|
||||
.itemInputs(mold)
|
||||
.itemOutputs(steelDusts)
|
||||
.duration(224)
|
||||
.EUt(GTValues.VA[GTValues.ULV])
|
||||
.category(GTRecipeCategories.MACERATOR_RECYCLING)
|
||||
|
||||
event.recipes.gtceu.forming_press(`copy_shape_${mold}`.replace("tfg:", ""))
|
||||
event.recipes.gtceu.forming_press(`copy_shape_${linuxUnfucker(mold)}`)
|
||||
.itemInputs('gtceu:empty_mold')
|
||||
.notConsumable(mold)
|
||||
.itemOutputs(mold)
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ function registerTFGRockRecipes(event) {
|
|||
]
|
||||
|
||||
GLUEING_TOGETHER.forEach(x => {
|
||||
const id = linuxUnfucker(`${x.loose}_to_${x.block}`);
|
||||
|
||||
event.shaped(x.block, [
|
||||
'ABA',
|
||||
'BAB',
|
||||
|
|
@ -45,9 +47,9 @@ function registerTFGRockRecipes(event) {
|
|||
], {
|
||||
A: x.loose,
|
||||
B: 'tfc:mortar'
|
||||
})
|
||||
}).id(`tfg:shaped/${id}`)
|
||||
|
||||
event.recipes.gtceu.assembler(`${x.loose}_to_${x.block}`.replace(/[: ]/g, '_'))
|
||||
event.recipes.gtceu.assembler(`tfg:${id}`)
|
||||
.itemInputs(`5x ${x.loose}`)
|
||||
.inputFluids(Fluid.of('gtceu:concrete', 72))
|
||||
.itemOutputs(x.block)
|
||||
|
|
@ -74,23 +76,27 @@ function registerTFGRockRecipes(event) {
|
|||
]
|
||||
|
||||
COBBLE_TO_LOOSE.forEach(x => {
|
||||
event.shapeless(`4x ${x.loose}`, [x.cobble]);
|
||||
const cobbleId = linuxUnfucker(x.cobble);
|
||||
|
||||
event.shapeless(`4x ${x.loose}`, [x.cobble])
|
||||
.id(`tfg:shapeless/unpacking_${cobbleId}`);
|
||||
|
||||
event.shaped(x.cobble, [
|
||||
'AA',
|
||||
'AA'
|
||||
], {
|
||||
A: x.loose
|
||||
});
|
||||
})
|
||||
.id(`tfg:shaped/packing_${cobbleId}`);
|
||||
|
||||
event.recipes.gtceu.packer(`tfc:gtceu/packer/unpacking_${x.cobble}`.replace(/[: ]/g, '_'))
|
||||
event.recipes.gtceu.packer(`tfg:unpacking_${cobbleId}`)
|
||||
.itemInputs(`1x ${x.cobble}`)
|
||||
.itemOutputs(`4x ${x.loose}`)
|
||||
.circuit(1)
|
||||
.duration(20)
|
||||
.EUt(GTValues.VA[GTValues.ULV])
|
||||
|
||||
event.recipes.gtceu.packer(`tfc:gtceu/packer/packing_${x.cobble}`.replace(/[: ]/g, '_'))
|
||||
event.recipes.gtceu.packer(`tfg:packing_${cobbleId}`)
|
||||
.itemInputs(`4x ${x.loose}`)
|
||||
.itemOutputs(`1x ${x.cobble}`)
|
||||
.circuit(1)
|
||||
|
|
@ -116,15 +122,18 @@ function registerTFGRockRecipes(event) {
|
|||
]
|
||||
|
||||
LOOSE_TO_BRICKS.forEach(x => {
|
||||
event.recipes.tfc.damage_inputs_shapeless_crafting(event.recipes.minecraft.crafting_shapeless(
|
||||
const id = linuxUnfucker(`${x.loose}_to_${x.brick}`);
|
||||
|
||||
event.recipes.tfc.damage_inputs_shapeless_crafting(event.shapeless(
|
||||
x.brick, [x.loose, '#tfc:chisels']
|
||||
))
|
||||
.id(`tfg:shapeless/${id}`);
|
||||
|
||||
event.recipes.gtceu.cutter(`${x.loose}_to_${x.brick}`.replace(/:/g, '_'))
|
||||
event.recipes.gtceu.cutter(`tfg:${id}`)
|
||||
.itemInputs(x.loose)
|
||||
.itemOutputs(x.brick)
|
||||
.duration(10)
|
||||
.EUt(2)
|
||||
.EUt(2);
|
||||
})
|
||||
// #endregion LOOSE_TO_BRICKS
|
||||
|
||||
|
|
@ -146,6 +155,8 @@ function registerTFGRockRecipes(event) {
|
|||
]
|
||||
|
||||
AQUEDUCTS.forEach(x => {
|
||||
const id = linuxUnfucker(`${x.brick}_to_${x.aqueduct}`);
|
||||
|
||||
event.shaped(x.aqueduct, [
|
||||
'A A',
|
||||
'BAB'
|
||||
|
|
@ -153,14 +164,15 @@ function registerTFGRockRecipes(event) {
|
|||
A: x.brick,
|
||||
B: 'tfc:mortar'
|
||||
})
|
||||
.id(`tfg:shaped/${id}`);
|
||||
|
||||
event.recipes.gtceu.assembler(`${x.brick}_to_${x.aqueduct}`.replace(/:/g, '_'))
|
||||
event.recipes.gtceu.assembler(`tfg:${id}`)
|
||||
.itemInputs(`3x ${x.brick}`)
|
||||
.circuit(3)
|
||||
.inputFluids(Fluid.of('gtceu:concrete', 16))
|
||||
.itemOutputs(x.aqueduct)
|
||||
.duration(50)
|
||||
.EUt(2)
|
||||
.EUt(2);
|
||||
})
|
||||
// #endregion AQUEDUCT
|
||||
|
||||
|
|
@ -186,7 +198,7 @@ function registerTFGRockRecipes(event) {
|
|||
|
||||
COBBLE_TO_MOSSY.forEach(x => {
|
||||
|
||||
event.recipes.gtceu.assembler(`${x.mossy}_cobble_rocks_to_mossy_cobble`.replace(/: /g, '_'))
|
||||
event.recipes.gtceu.assembler(`tfg:${linuxUnfucker(x.mossy)}_cobble_rocks_to_mossy_cobble`)
|
||||
.itemInputs(x.cobble, '#tfc:compost_greens_low')
|
||||
.circuit(0)
|
||||
.inputFluids("#tfg:clean_water 144")
|
||||
|
|
@ -336,18 +348,22 @@ function registerTFGRockRecipes(event) {
|
|||
]
|
||||
|
||||
RAW_TO_POLISHED.forEach(x => {
|
||||
event.recipes.tfc.chisel(`${x.polished}`, `${x.raw}`, 'smooth')
|
||||
const id = linuxUnfucker(`${x.raw}_to_${x.polished}`);
|
||||
|
||||
event.recipes.tfc.damage_inputs_shapeless_crafting(event.recipes.minecraft.crafting_shapeless(
|
||||
event.recipes.tfc.chisel(`${x.polished}`, `${x.raw}`, 'smooth')
|
||||
.id(`tfg:chisel/${id}`);
|
||||
|
||||
event.recipes.tfc.damage_inputs_shapeless_crafting(event.shapeless(
|
||||
x.polished, [x.raw, '#tfc:chisels']
|
||||
))
|
||||
.id(`tfg:shapeless/${id}`);
|
||||
|
||||
event.recipes.gtceu.laser_engraver(`${x.raw}_to_${x.polished}`.replace(/:/g, '_'))
|
||||
event.recipes.gtceu.laser_engraver(`tfg:${id}`)
|
||||
.itemInputs(x.raw)
|
||||
.itemOutputs(x.polished)
|
||||
.notConsumable('tfc:lens')
|
||||
.duration(30)
|
||||
.EUt(GTValues.VA[GTValues.ULV])
|
||||
.EUt(GTValues.VA[GTValues.ULV]);
|
||||
})
|
||||
|
||||
// #endregion RAW_TO_POLISHED
|
||||
|
|
@ -366,38 +382,42 @@ function registerTFGRockRecipes(event) {
|
|||
{ raw: 'ad_astra:glacio_stone_bricks', cracked: 'ad_astra:cracked_glacio_stone_bricks' },
|
||||
{ raw: 'ad_astra:permafrost_bricks', cracked: 'ad_astra:cracked_permafrost_bricks' },
|
||||
{ raw: 'gtceu:red_granite_bricks', cracked: 'gtceu:cracked_red_granite_bricks' }
|
||||
|
||||
]
|
||||
|
||||
CRACKING.forEach(x => {
|
||||
event.recipes.tfc.damage_inputs_shapeless_crafting(event.recipes.minecraft.crafting_shapeless(
|
||||
const id = linuxUnfucker(`${x.raw}_to_${x.cracked}`);
|
||||
|
||||
event.recipes.tfc.damage_inputs_shapeless_crafting(event.shapeless(
|
||||
x.cracked, [x.raw, '#tfc:hammers']
|
||||
))
|
||||
.id(`tfg:shapeless/${id}`);
|
||||
|
||||
event.recipes.gtceu.forge_hammer(`${x.raw}_to_${x.cracked}`.replace(/:/g, '_'))
|
||||
event.recipes.gtceu.forge_hammer(`tfg:${id}`)
|
||||
.itemInputs(x.raw)
|
||||
.itemOutputs(x.cracked)
|
||||
.duration(12)
|
||||
.EUt(8)
|
||||
.EUt(8);
|
||||
|
||||
event.recipes.greate.pressing(x.cracked, x.raw)
|
||||
.recipeTier(0)
|
||||
.id(`greate:pressing/${x.raw}_to_${x.cracked}`.replace(/:/g, '_'))
|
||||
.id(`tfg:pressing/${id}`);
|
||||
})
|
||||
// #endregion CRACKING
|
||||
|
||||
// #region HAMMERING
|
||||
// Defined in kubejs/startup_scripts/tfg/constants.js
|
||||
global.HAMMERING.forEach(x => {
|
||||
event.recipes.gtceu.forge_hammer(`${x.raw}_to_${x.hammered}`.replace(/[: ]/g, '_'))
|
||||
const id = linuxUnfucker(`${x.raw}_to_${x.hammered}`);
|
||||
|
||||
event.recipes.gtceu.forge_hammer(`tfg:${id}`)
|
||||
.itemInputs(x.raw)
|
||||
.itemOutputs(x.hammered)
|
||||
.duration(x.duration)
|
||||
.EUt(x.eu)
|
||||
.EUt(x.eu);
|
||||
|
||||
event.recipes.greate.pressing(x.hammered, x.raw)
|
||||
.recipeTier(x.eu <= 8 ? 0 : 1)
|
||||
.id(`greate:pressing/${x.raw}_to_${x.hammered}`.replace(/[: ]/g, '_'))
|
||||
.id(`tfg:pressing/${id}`);
|
||||
})
|
||||
// #endregion HAMMERING
|
||||
|
||||
|
|
@ -877,79 +897,87 @@ function registerTFGRockRecipes(event) {
|
|||
|
||||
CUT_GRIND.forEach(x => {
|
||||
if (x.raw != null && x.dust != null) {
|
||||
try{
|
||||
event.recipes.gtceu.macerator(x.raw.replace(/.*:/g, 'macerate_'))
|
||||
.itemInputs(x.raw)
|
||||
.itemOutputs(x.dust)
|
||||
.duration(150)
|
||||
.EUt(2)
|
||||
.category(GTRecipeCategories.MACERATOR_RECYCLING)
|
||||
} catch(e){ }
|
||||
event.recipes.gtceu.macerator(`tfg:macerate_${linuxUnfucker(x.raw)}`)
|
||||
.itemInputs(x.raw)
|
||||
.itemOutputs(x.dust)
|
||||
.duration(150)
|
||||
.EUt(2)
|
||||
.category(GTRecipeCategories.MACERATOR_RECYCLING)
|
||||
}
|
||||
if (x.stair != null) {
|
||||
if (x.raw != null) {
|
||||
const id = linuxUnfucker(`${x.raw}_to_${x.stair}`);
|
||||
|
||||
event.recipes.tfc.chisel(x.stair, x.raw, 'stair')
|
||||
.id(`tfg:chisel/${id}`);
|
||||
|
||||
if (x.stonecutting) {
|
||||
event.stonecutting(x.stair, x.raw).id(`${x.raw}_to_${x.stair}`.replace(/:/g, '_'))
|
||||
event.stonecutting(x.stair, x.raw)
|
||||
.id(`tfg:stonecutter/${id}`);
|
||||
}
|
||||
}
|
||||
|
||||
if (x.dust != null) {
|
||||
event.recipes.gtceu.macerator(x.stair.replace(/.*:/g, 'macerate_'))
|
||||
event.recipes.gtceu.macerator(`tfg:macerate_${linuxUnfucker(x.stair)}`)
|
||||
.itemInputs(x.stair)
|
||||
.itemOutputs(x.dust)
|
||||
.duration(150)
|
||||
.EUt(2)
|
||||
.category(GTRecipeCategories.MACERATOR_RECYCLING)
|
||||
.category(GTRecipeCategories.MACERATOR_RECYCLING);
|
||||
}
|
||||
|
||||
if (x.loose != null) {
|
||||
event.shapeless(`3x ${x.loose}`, [x.stair])
|
||||
event.shapeless(`3x ${x.loose}`, [x.stair]);
|
||||
}
|
||||
}
|
||||
if (x.slab != null) {
|
||||
if (x.raw != null) {
|
||||
event.recipes.tfc.chisel(x.slab, x.raw, 'slab').extraDrop(x.slab)
|
||||
const id = linuxUnfucker(`${x.raw}_to_${x.slab}`);
|
||||
|
||||
event.recipes.tfc.chisel(x.slab, x.raw, 'slab')
|
||||
.extraDrop(x.slab)
|
||||
.id(`tfg:chisel/${id}`);
|
||||
|
||||
if (x.stonecutting) {
|
||||
event.stonecutting(`2x ${x.slab}`, x.raw).id(`${x.raw}_to_${x.slab}`.replace(/:/g, '_'))
|
||||
event.stonecutting(`2x ${x.slab}`, x.raw)
|
||||
.id(`tfg:stonecutting/${id}`);
|
||||
}
|
||||
}
|
||||
|
||||
if (x.dust != null) {
|
||||
event.recipes.gtceu.macerator(x.slab.replace(/.*:/g, 'macerate_'))
|
||||
event.recipes.gtceu.macerator(`tfg:macerate_${linuxUnfucker(x.slab)}`)
|
||||
.itemInputs(`2x ${x.slab}`)
|
||||
.itemOutputs(x.dust)
|
||||
.duration(150)
|
||||
.EUt(2)
|
||||
.category(GTRecipeCategories.MACERATOR_RECYCLING)
|
||||
.category(GTRecipeCategories.MACERATOR_RECYCLING);
|
||||
}
|
||||
|
||||
if (x.loose != null) {
|
||||
event.shapeless(`2x ${x.loose}`, [x.slab])
|
||||
event.shapeless(`2x ${x.loose}`, [x.slab]);
|
||||
}
|
||||
}
|
||||
if (x.wall != null) {
|
||||
if (x.raw != null) {
|
||||
if (x.stonecutting) {
|
||||
event.stonecutting(x.wall, x.raw).id(`${x.raw}_to_${x.wall}`.replace(/:/g, '_'))
|
||||
event.stonecutting(x.wall, x.raw)
|
||||
.id(`tfg:stonecutting/${linuxUnfucker(x.raw)}_to_${linuxUnfucker(x.wall)}`)
|
||||
}
|
||||
}
|
||||
if (x.slab != null) {
|
||||
event.recipes.tfc.chisel(x.wall, x.slab, 'smooth')
|
||||
event.recipes.tfc.chisel(x.wall, x.slab, 'smooth');
|
||||
}
|
||||
|
||||
if (x.dust != null) {
|
||||
event.recipes.gtceu.macerator(x.wall.replace(/.*:/g, 'macerate_'))
|
||||
event.recipes.gtceu.macerator(`tfg:macerate_${linuxUnfucker(x.wall)}`)
|
||||
.itemInputs(`2x ${x.wall}`)
|
||||
.itemOutputs(x.dust)
|
||||
.duration(150)
|
||||
.EUt(2)
|
||||
.category(GTRecipeCategories.MACERATOR_RECYCLING)
|
||||
.category(GTRecipeCategories.MACERATOR_RECYCLING);
|
||||
}
|
||||
if (x.loose != null) {
|
||||
event.shapeless(`2x ${x.loose}`, [x.wall])
|
||||
event.shapeless(`2x ${x.loose}`, [x.wall]);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -995,12 +1023,12 @@ function registerTFGRockRecipes(event) {
|
|||
]
|
||||
|
||||
MACERATOR.forEach(x => {
|
||||
event.recipes.gtceu.macerator(x.block.replace(/.*:/g, 'macerate_'))
|
||||
event.recipes.gtceu.macerator(`tfg:macerate_${linuxUnfucker(x.block)}`)
|
||||
.itemInputs(x.block)
|
||||
.itemOutputs(x.dust)
|
||||
.duration(150)
|
||||
.EUt(2)
|
||||
.category(GTRecipeCategories.MACERATOR_RECYCLING)
|
||||
.category(GTRecipeCategories.MACERATOR_RECYCLING);
|
||||
})
|
||||
//#endregion
|
||||
|
||||
|
|
@ -1027,7 +1055,9 @@ function registerTFGRockRecipes(event) {
|
|||
STONECUTTER.forEach(set => {
|
||||
set.forEach(block1 => {
|
||||
set.forEach(block2 => {
|
||||
if( block1 != block2 ){ event.stonecutting(block1, block2) }
|
||||
if (block1 !== block2) {
|
||||
event.stonecutting(block1, block2);
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
@ -1075,14 +1105,18 @@ function registerTFGRockRecipes(event) {
|
|||
]
|
||||
|
||||
PILLARS.forEach(x => {
|
||||
const id = linuxUnfucker(`${x.raw}_to_${x.pillar}`);
|
||||
|
||||
event.shaped(`2x ${x.pillar}`, [
|
||||
'A',
|
||||
'A'
|
||||
], {
|
||||
A: x.raw
|
||||
})
|
||||
.id(`tfg:shaped/${id}`);
|
||||
|
||||
event.stonecutting(x.pillar, x.raw).id(`${x.raw}_to_${x.pillar}`.replace(/:/g, '_'))
|
||||
event.stonecutting(x.pillar, x.raw)
|
||||
.id(`tfg:stonecutting/${id}`);
|
||||
})
|
||||
|
||||
// horizontal shaped recipes
|
||||
|
|
@ -1171,15 +1205,17 @@ function registerTFGRockRecipes(event) {
|
|||
]
|
||||
|
||||
ROCK_DUPING.forEach(x => {
|
||||
const id = linuxUnfucker(x.block);
|
||||
|
||||
if (x.dimension != null) {
|
||||
event.recipes.gtceu.rock_breaker(x.block)
|
||||
event.recipes.gtceu.rock_breaker(`tfg:${id}`)
|
||||
.notConsumable(x.block)
|
||||
.itemOutputs(x.block)
|
||||
.duration(16)
|
||||
.EUt(7)
|
||||
.dimension(x.dimension)
|
||||
} else {
|
||||
event.recipes.gtceu.rock_breaker(x.block)
|
||||
event.recipes.gtceu.rock_breaker(`tfg:${id}`)
|
||||
.notConsumable(x.block)
|
||||
.itemOutputs(x.block)
|
||||
.duration(16)
|
||||
|
|
@ -1221,14 +1257,14 @@ function registerTFGRockRecipes(event) {
|
|||
];
|
||||
|
||||
MAGMA_BLOCKS.forEach(block => {
|
||||
event.recipes.gtceu.fluid_solidifier(`tfg:gtceu/fluid_solidifier/${block.magma}`.replace(/:/g, '/'))
|
||||
event.recipes.gtceu.fluid_solidifier(`tfg:gtceu/fluid_solidifier/${linuxUnfucker(block.magma)}`)
|
||||
.itemInputs(`1x ${block.rock}`)
|
||||
.inputFluids(Fluid.of('minecraft:lava', 250))
|
||||
.itemOutputs(`1x ${block.magma}`)
|
||||
.duration(100)
|
||||
.EUt(GTValues.VA[GTValues.ULV])
|
||||
|
||||
event.recipes.gtceu.extractor(`tfg:gtceu/extractor/${block.magma}`.replace(/:/g, "/"))
|
||||
event.recipes.gtceu.extractor(`tfg:gtceu/extractor/${linuxUnfucker(block.magma)}`)
|
||||
.itemInputs(`1x ${block.magma}`)
|
||||
.outputFluids(Fluid.of('minecraft:lava', 250))
|
||||
.itemOutputs(`1x ${block.rock}`)
|
||||
|
|
|
|||
|
|
@ -141,14 +141,16 @@ function registerTFGAlloyingRecipes(event) {
|
|||
|
||||
copper_types.forEach(copper_types_array => {
|
||||
gold_types.forEach(gold_types_array => {
|
||||
event.recipes.gtceu.alloy_smelter(`rose_gold_from_${copper_types_array.replace(/:/g, "/").replace(/#/g, "")}_and_${gold_types_array.replace(/:/g, "/").replace(/#/g, "")}`)
|
||||
const id = linuxUnfucker(`${copper_types_array}_and_${gold_types_array}`.replace(/#/g, ""));
|
||||
event.recipes.gtceu.alloy_smelter(`tfg:rose_gold_from_${id}`)
|
||||
.itemInputs(Ingredient.of(copper_types_array).withCount(1), Ingredient.of(gold_types_array).withCount(4))
|
||||
.itemOutputs(ChemicalHelper.get(TagPrefix.ingot, GTMaterials.RoseGold, 5))
|
||||
.duration(20*10)
|
||||
.EUt(GTValues.VA[GTValues.LV])
|
||||
});
|
||||
silver_types.forEach(silver_types_array => {
|
||||
event.recipes.gtceu.alloy_smelter(`sterling_silver_from_${copper_types_array.replace(/:/g, "/").replace(/#/g, "")}_and_${silver_types_array.replace(/:/g, "/").replace(/#/g, "")}`)
|
||||
const id = linuxUnfucker(`${copper_types_array}_and_${silver_types_array}`.replace(/#/g, ""));
|
||||
event.recipes.gtceu.alloy_smelter(`tfg:sterling_silver_from_${id}`)
|
||||
.itemInputs(Ingredient.of(copper_types_array).withCount(1), Ingredient.of(silver_types_array).withCount(4))
|
||||
.itemOutputs(ChemicalHelper.get(TagPrefix.ingot, GTMaterials.SterlingSilver, 5))
|
||||
.duration(20*10)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
// priority: 0
|
||||
"use strict";
|
||||
|
||||
//function getMaterialRecyclingExtractorEUt(material) {
|
||||
// // Special case for bis/black bronze because removing the blast property doesn't change the tier of
|
||||
// // the extractor recipes retroactively
|
||||
// return material.hasProperty(PropertyKey.BLAST) && material !== GTMaterials.BismuthBronze && material !== GTMaterials.BlackBronze
|
||||
// ? GTValues.VA[GTValues.MV]
|
||||
// : GTValues.VA[GTValues.LV];
|
||||
//}
|
||||
|
||||
//function addMaterialRecycling(event, item, materialMap) {
|
||||
|
||||
|
||||
// const tfcProperty = material.getProperty(TFGPropertyKey.TFC_PROPERTY);
|
||||
// if (tfcProperty !== null) {
|
||||
// const outputMaterial = (tfcProperty.getOutputMaterial() === null) ? material : tfcProperty.getOutputMaterial();
|
||||
|
||||
// event.recipes.tfc.heating(ingotItem, tfcProperty.getMeltTemp())
|
||||
// .resultFluid(Fluid.of(outputMaterial.getFluid(), 144))
|
||||
// .id(`tfc:heating/metal/${material.getName()}_ingot`)
|
||||
// }
|
||||
//}
|
||||
|
||||
function registerTFGMaterialRecipes(event) {
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
const registerTFGRecipes = (event) => {
|
||||
|
||||
registerTFGMaterialRecipes(event)
|
||||
registerTFGMoldRecipes(event)
|
||||
registerTFGMiscellaneousRecipes(event)
|
||||
registerTFGTemporaryRecipes(event)
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ function registerTFGBiochemRecipes(event) {
|
|||
];
|
||||
|
||||
lab_casting.forEach(entry => {
|
||||
event.recipes.gtceu.fluid_solidifier(`tfg:lab_casting/${entry.output.replace(':', '_')}`)
|
||||
event.recipes.gtceu.fluid_solidifier(`tfg:lab_casting/${linuxUnfucker(entry.output)}`)
|
||||
.inputFluids(Fluid.of('gtceu:borosilicate_glass', entry.fluid_qty))
|
||||
.notConsumable(entry.mold)
|
||||
.itemOutputs(entry.output)
|
||||
|
|
@ -429,7 +429,7 @@ function registerTFGBiochemRecipes(event) {
|
|||
* @param {number} organicAmount - Amount of the organic input.
|
||||
*/
|
||||
function deccellularizationRecipe(event, organicType, organicId, organicAmount) {
|
||||
let recipe = event.recipes.gtceu.bioreactor(`tfg:decellularization/${organicId.replace(':', '_')}`)
|
||||
let recipe = event.recipes.gtceu.bioreactor(`tfg:decellularization/${linuxUnfucker(organicId)}`)
|
||||
.inputFluids(
|
||||
Fluid.of('tfg:sodium_dodecyl_sulfate', 200),
|
||||
Fluid.of('gtceu:acetone', 1000),
|
||||
|
|
@ -530,7 +530,7 @@ function registerTFGBiochemRecipes(event) {
|
|||
'gtceu:acetone'
|
||||
];
|
||||
gramStainSolvents.forEach(solvent => {
|
||||
event.recipes.gtceu.large_chemical_reactor(`tfg:gram_stain_solvent_${solvent.replace(':', '_')}`)
|
||||
event.recipes.gtceu.large_chemical_reactor(`tfg:gram_stain_solvent_${linuxUnfucker(solvent)}`)
|
||||
.inputFluids(
|
||||
Fluid.of('tfg:crystal_violet', 1000),
|
||||
Fluid.of('tfc:red_dye', 1000),
|
||||
|
|
|
|||
|
|
@ -643,5 +643,5 @@ function generateHammeringRecipeFromItem(event, input, output, blows, anvil) {
|
|||
event.recipes.vintageimprovements.hammering(output, input)
|
||||
.anvilBlock(`tfc:metal/anvil/${anvil}`)
|
||||
.hammerBlows(Math.max(blows, 1))
|
||||
.id(`tfg:vi/hammer/${input.replace(/[#:]/g, '_')}_on_${anvil}_anvil`)
|
||||
.id(`tfg:vi/hammer/${linuxUnfucker(input)}_on_${anvil}_anvil`)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue