570 lines
15 KiB
JavaScript
570 lines
15 KiB
JavaScript
// priority: 9999
|
|
|
|
const ingot_to_dust = [
|
|
["ftbmaterials:tin_ingot", "ftbmaterials:tin_dust"],
|
|
["ftbmaterials:invar_ingot", "ftbmaterials:invar_dust"],
|
|
["ftbmaterials:bronze_ingot", "ftbmaterials:bronze_dust"],
|
|
["ftbmaterials:lead_ingot", "ftbmaterials:lead_dust"],
|
|
["ftbmaterials:steel_ingot", "ftbmaterials:steel_dust"],
|
|
["ftbmaterials:electrum_ingot", "ftbmaterials:electrum_dust"],
|
|
["minecraft:copper_ingot", "ftbmaterials:copper_dust"],
|
|
["ftbmaterials:uranium_ingot", "ftbmaterials:uranium_dust"],
|
|
["ftbmaterials:nickel_ingot", "ftbmaterials:nickel_dust"],
|
|
["ftbmaterials:titanium_ingot", "ftbmaterials:titanium_dust"],
|
|
["ftbmaterials:tungsten_ingot", "ftbmaterials:tungsten_dust"],
|
|
["ftbmaterials:iridium_ingot", "ftbmaterials:iridium_dust"],
|
|
["ftbmaterials:antimony_ingot", "ftbmaterials:antimony_dust"],
|
|
["ftbmaterials:silver_ingot", "ftbmaterials:silver_dust"],
|
|
["ftbmaterials:osmium_ingot", "ftbmaterials:osmium_dust"],
|
|
];
|
|
|
|
const ores_to_raw_mi = [
|
|
"lead",
|
|
"nickel",
|
|
"tin",
|
|
"antimony",
|
|
"iridium",
|
|
"platinum"
|
|
];
|
|
|
|
const materials = [
|
|
"aluminum",
|
|
"bronze",
|
|
"diamond",
|
|
"electrum",
|
|
"gold",
|
|
"iron",
|
|
"steel",
|
|
"titanium",
|
|
"platinum",
|
|
"invar",
|
|
"nickel",
|
|
"silver",
|
|
"tin",
|
|
"zinc",
|
|
"iridium",
|
|
"tungsten",
|
|
"antimony",
|
|
];
|
|
|
|
const rodMaterials = [
|
|
"aluminum",
|
|
"bronze",
|
|
"steel",
|
|
"iron",
|
|
"titanium",
|
|
"invar",
|
|
"tin",
|
|
];
|
|
|
|
const nuggetCrafts = [
|
|
"ftbmaterials:tin_nugget",
|
|
"ftbmaterials:steel_nugget",
|
|
"ftbmaterials:refined_glowstone_nugget",
|
|
"ftbmaterials:silver_nugget",
|
|
"ftbmaterials:osmium_nugget",
|
|
"ftbmaterials:lead_nugget",
|
|
"ftbmaterials:uranium_nugget",
|
|
"ftbmaterials:zinc_nugget",
|
|
"ftbmaterials:antimony_nugget",
|
|
];
|
|
|
|
|
|
ServerEvents.recipes((event) => {
|
|
|
|
function eio_crushing(input, output) {
|
|
event.custom({
|
|
"type": "enderio:sag_milling",
|
|
"bonus": "none",
|
|
"energy": 2400,
|
|
"input": {
|
|
"tag": input
|
|
},
|
|
"outputs": [
|
|
{
|
|
"item": {
|
|
"count": 1,
|
|
"id": output
|
|
}
|
|
}
|
|
]
|
|
}).id(`ftb:eio_crushing_${input.split(':').join('_')}`);
|
|
}
|
|
|
|
function mi_crush(input,output,count){
|
|
event
|
|
.custom({
|
|
type: "modern_industrialization:macerator",
|
|
duration: 100,
|
|
eu: 2,
|
|
item_inputs: [
|
|
{
|
|
amount: 1,
|
|
tag: input,
|
|
},
|
|
],
|
|
item_outputs: [
|
|
{
|
|
amount: count,
|
|
item: output,
|
|
},
|
|
],
|
|
})
|
|
.id(`ftb:mi_crushing${input.split(':').join('_')}`);
|
|
}
|
|
|
|
function aa_crushing(input, output) {
|
|
event.custom({
|
|
"type": "actuallyadditions:crushing",
|
|
"ingredient": {
|
|
"item": input
|
|
},
|
|
"result": [
|
|
{
|
|
"result": {
|
|
"count": 1,
|
|
"id": output
|
|
}
|
|
}
|
|
]
|
|
}).id(`ftb:aa_crushing_${input.split(':').join('_')}`);
|
|
}
|
|
|
|
|
|
nuggetCrafts.forEach((nugget) => {
|
|
event
|
|
.shapeless(Item.of(nugget, 9), [nugget.replace("_nugget", "_ingot")])
|
|
.id(`ftb:ingot_to_nugget_${nugget.replace("ftbmaterials:", "")}`);
|
|
event
|
|
.shaped(nugget.replace("_nugget", "_ingot"), ["NNN", "NNN", "NNN"], {
|
|
N: nugget,
|
|
})
|
|
.id(`ftb:nugget_to_ingot_${nugget.replace("ftbmaterials:", "")}`);
|
|
});
|
|
|
|
event
|
|
.shapeless(Item.of("ftbmaterials:netherite_nugget", 9), [
|
|
"minecraft:netherite_ingot",
|
|
])
|
|
.id(`ftb:ingot_to_nugget_netherite`);
|
|
event
|
|
.shaped("minecraft:netherite_ingot", ["NNN", "NNN", "NNN"], {
|
|
N: "ftbmaterials:netherite_nugget",
|
|
})
|
|
.id(`ftb:nugget_to_ingot_netherite`);
|
|
|
|
// Rods =========================================================================================
|
|
|
|
rodMaterials.forEach((rodmaterial) => {
|
|
// Replace MI Rods
|
|
const rodAllInput = `modern_industrialization:${rodmaterial}_rod`;
|
|
const rodAllOutput = `ftbmaterials:${rodmaterial}_rod`;
|
|
event.replaceOutput(
|
|
{ mod: "modern_industrialization" },
|
|
rodAllInput,
|
|
rodAllOutput
|
|
);
|
|
});
|
|
|
|
rodMaterials.forEach((rodmaterial) => {
|
|
// Replace MI Rods
|
|
const rodAllInput = `immersiveengineering:stick_${rodmaterial}`;
|
|
const rodAllOutput = `ftbmaterials:${rodmaterial}_rod`;
|
|
if (Item.exists(rodAllInput)) {
|
|
event.replaceOutput(
|
|
{ mod: "immersiveengineering" },
|
|
rodAllInput,
|
|
rodAllOutput
|
|
);
|
|
} else { return; }
|
|
});
|
|
|
|
//Adding more Rod Recipes ===
|
|
//If "mi_double" is true, it will also add Cutting Machine and Forge Hammer Recipes that uses MI's Double Ingots.
|
|
const universal_rod_recipes = [
|
|
{
|
|
material: "lead",
|
|
cutting_machine: false,
|
|
mi_double: true,
|
|
forge_hammer: true,
|
|
metal_press: false,
|
|
rolling: true},
|
|
{
|
|
material: "netherite",
|
|
cutting_machine: false,
|
|
mi_double: false,
|
|
forge_hammer: false,
|
|
metal_press: false,
|
|
rolling: true
|
|
},
|
|
{
|
|
material: "nickel",
|
|
remove_originals: true,
|
|
cutting_machine: true,
|
|
mi_double: true,
|
|
forge_hammer: true,
|
|
metal_press: false,
|
|
rolling: true
|
|
},
|
|
{
|
|
material: "osmium",
|
|
remove_originals: true,
|
|
cutting_machine: true,
|
|
mi_double: false,
|
|
forge_hammer: true,
|
|
metal_press: false,
|
|
rolling: true
|
|
},
|
|
{
|
|
material: "silver",
|
|
remove_originals: true,
|
|
cutting_machine: true,
|
|
mi_double: true,
|
|
forge_hammer: true,
|
|
metal_press: false,
|
|
rolling: true
|
|
},
|
|
{
|
|
material: "zinc",
|
|
remove_originals: true,
|
|
cutting_machine: true,
|
|
mi_double: false,
|
|
forge_hammer: true,
|
|
metal_press: false,
|
|
rolling: true
|
|
},
|
|
{
|
|
material: "tungsten",
|
|
remove_originals: false,
|
|
cutting_machine: true,
|
|
mi_double: true,
|
|
forge_hammer: true,
|
|
metal_press: false,
|
|
rolling: true
|
|
},
|
|
{
|
|
material: "titanium",
|
|
remove_originals: false,
|
|
cutting_machine: false,
|
|
mi_double: true,
|
|
forge_hammer: true,
|
|
metal_press: false,
|
|
rolling: true
|
|
},
|
|
{
|
|
material: "platinum",
|
|
remove_originals: true,
|
|
cutting_machine: true,
|
|
mi_double: true,
|
|
forge_hammer: true,
|
|
metal_press: false,
|
|
rolling: true
|
|
},
|
|
{
|
|
material: "brass",
|
|
remove_originals: true,
|
|
cutting_machine: true,
|
|
mi_double: false,
|
|
forge_hammer: true,
|
|
metal_press: false,
|
|
rolling: false
|
|
}
|
|
];
|
|
|
|
universal_rod_recipes.forEach(recipe => {
|
|
//Modern Industrialization's Cutting Machine
|
|
if (recipe.cutting_machine) {
|
|
if (recipe.remove_originals) {
|
|
event.remove({ id: `jaopca:modern_industrialization.material_to_rod.${recipe.material}` });
|
|
}
|
|
event.custom({
|
|
"type": "modern_industrialization:cutting_machine",
|
|
"duration": 200,
|
|
"eu": 2,
|
|
"fluid_inputs": [
|
|
{
|
|
"amount": 1,
|
|
"fluid": "modern_industrialization:lubricant"
|
|
}
|
|
],
|
|
"item_inputs": [
|
|
{
|
|
"amount": 1,
|
|
"tag": `c:ingots/${recipe.material}`
|
|
}
|
|
],
|
|
"item_outputs": [
|
|
{
|
|
"amount": 2,
|
|
"item": `ftbmaterials:${recipe.material}_rod`
|
|
}
|
|
]
|
|
}).id(`ftb:materials/${recipe.material}/rod/cutting_machine`);
|
|
if (recipe.mi_double) {
|
|
event.custom({
|
|
"type": "modern_industrialization:cutting_machine",
|
|
"duration": 200,
|
|
"eu": 2,
|
|
"fluid_inputs": [
|
|
{
|
|
"amount": 1,
|
|
"fluid": "modern_industrialization:lubricant"
|
|
}
|
|
],
|
|
"item_inputs": [
|
|
{
|
|
"amount": 1,
|
|
"item": `modern_industrialization:${recipe.material}_double_ingot`
|
|
}
|
|
],
|
|
"item_outputs": [
|
|
{
|
|
"amount": 4,
|
|
"item": `ftbmaterials:${recipe.material}_rod`
|
|
}
|
|
]
|
|
}).id(`ftb:materials/${recipe.material}/rod/double_ingot_cutting_machine`);
|
|
}
|
|
}
|
|
|
|
//Modern Industrialization's Forge HAMMAH!
|
|
if (recipe.forge_hammer) {
|
|
event.custom({
|
|
"type": "modern_industrialization:forge_hammer",
|
|
"ingredient": {
|
|
"tag": `c:ingots/${recipe.material}`
|
|
},
|
|
"result": {
|
|
"count": 1,
|
|
"id": `ftbmaterials:${recipe.material}_rod`
|
|
}
|
|
}).id(`ftb:materials/${recipe.material}/rod/forge_hammer`);
|
|
event.custom({
|
|
"type": "modern_industrialization:forge_hammer",
|
|
"damage": 20,
|
|
"ingredient": {
|
|
"tag": `c:ingots/${recipe.material}`
|
|
},
|
|
"result": {
|
|
"count": 2,
|
|
"id": `ftbmaterials:${recipe.material}_rod`
|
|
}
|
|
}).id(`ftb:materials/${recipe.material}/rod/forge_hammer_with_tool`);
|
|
|
|
if (recipe.mi_double) {
|
|
event.custom({
|
|
"type": "modern_industrialization:forge_hammer",
|
|
"ingredient": {
|
|
"item": `modern_industrialization:${recipe.material}_double_ingot`
|
|
},
|
|
"result": {
|
|
"count": 2,
|
|
"id": `ftbmaterials:${recipe.material}_rod`
|
|
}
|
|
}).id(`ftb:materials/${recipe.material}/rod/double_ingot_forge_hammer`);
|
|
event.custom({
|
|
"type": "modern_industrialization:forge_hammer",
|
|
"damage": 20,
|
|
"ingredient": {
|
|
"item": `modern_industrialization:${recipe.material}_double_ingot`
|
|
},
|
|
"result": {
|
|
"count": 4,
|
|
"id": `ftbmaterials:${recipe.material}_rod`
|
|
}
|
|
}).id(`ftb:materials/${recipe.material}/rod/double_ingot_forge_hammer_with_tool`);
|
|
} else {
|
|
return;
|
|
}
|
|
}
|
|
|
|
//Immersive Engineergin's Metal Press
|
|
if (recipe.metal_press) {
|
|
event.custom({
|
|
"type": "immersiveengineering:metal_press",
|
|
"energy": 2400,
|
|
"input": {
|
|
"tag": `c:ingots/${recipe.material}`
|
|
},
|
|
"mold": "immersiveengineering:mold_rod",
|
|
"result": {
|
|
"basePredicate": {
|
|
"tag": `c:rods/${recipe.material}`
|
|
},
|
|
"count": 2
|
|
}
|
|
}).id(`ftb:materials/${recipe.material}/rod/metal_press`);
|
|
}
|
|
|
|
//Create Addition's Rolling Machine
|
|
if (recipe.rolling) {
|
|
event.custom({
|
|
"type": "createaddition:rolling",
|
|
"ingredients": [
|
|
{
|
|
"tag": `c:ingots/${recipe.material}`
|
|
}
|
|
],
|
|
"results": [
|
|
{
|
|
"count": 2,
|
|
"id": `ftbmaterials:${recipe.material}_rod`
|
|
}
|
|
]
|
|
}).id(`ftb:materials/${recipe.material}/rod/rolling`);
|
|
}
|
|
|
|
});
|
|
|
|
// ==============================================================================================
|
|
|
|
materials.forEach((material) => {
|
|
// Replace MI Ingots
|
|
const ingotAllInput = `modern_industrialization:${material}_ingot`;
|
|
const ingotAllOutput = `ftbmaterials:${material}_ingot`;
|
|
if (Item.exists(ingotAllInput)) {
|
|
event.replaceOutput(
|
|
{ mod: "modern_industrialization" },
|
|
ingotAllInput,
|
|
ingotAllOutput
|
|
);
|
|
} else { return; }
|
|
|
|
// Replace Mek Ingots
|
|
const ingotAllMekInput = `mekanism:ingot_${material}`;
|
|
const ingotAllMekOutput = `ftbmaterials:${material}_ingot`;
|
|
if (Item.exists(ingotAllMekInput)) {
|
|
event.replaceOutput(
|
|
{ mod: "modern_industrialization" },
|
|
ingotAllMekInput,
|
|
ingotAllMekOutput
|
|
);
|
|
} else { return; }
|
|
|
|
// Replace Gears
|
|
const gearInput = `modern_industrialization:${material}_gear`;
|
|
const gearOutput = `ftbmaterials:${material}_gear`;
|
|
event.replaceOutput(
|
|
{ mod: "modern_industrialization" },
|
|
gearInput,
|
|
gearOutput
|
|
);
|
|
|
|
// Replace Plates
|
|
const plateInput = `modern_industrialization:${material}_plate`;
|
|
const plateOutput = `ftbmaterials:${material}_plate`;
|
|
event.replaceOutput(
|
|
{ mod: "modern_industrialization" },
|
|
plateInput,
|
|
plateOutput
|
|
);
|
|
|
|
// Replace Rods
|
|
const rodInput = `modern_industrialization:${material}_plate`;
|
|
const rodOutput = `ftbmaterials:${material}_plate`;
|
|
event.replaceInput(
|
|
{ mod: "modern_industrialization" },
|
|
rodInput,
|
|
rodOutput
|
|
);
|
|
|
|
// Replace Nuggets
|
|
const nuggetInput = `modern_industrialization:${material}_nugget`;
|
|
const nuggetOutput = `ftbmaterials:${material}_nugget`;
|
|
event.replaceOutput(
|
|
{ mod: "modern_industrialization" },
|
|
nuggetInput,
|
|
nuggetOutput
|
|
);
|
|
// Replace Dust
|
|
const dustInput = `modern_industrialization:${material}_dust`;
|
|
const dustOutput = `ftbmaterials:${material}_dust`;
|
|
event.replaceOutput(
|
|
{ mod: "modern_industrialization" },
|
|
dustInput,
|
|
dustOutput
|
|
);
|
|
});
|
|
|
|
event.replaceOutput(
|
|
{ mod: "modern_industrialization" },
|
|
"modern_industrialization:bauxite_dust",
|
|
"ftbmaterials:bauxite_dust"
|
|
);
|
|
|
|
event.replaceOutput(
|
|
{ mod: "modern_industrialization" },
|
|
"mekanism:dust_copper",
|
|
"ftbmaterials:copper_dust"
|
|
);
|
|
|
|
event.replaceOutput(
|
|
{ mod: "enderio" },
|
|
"enderio:iron_gear",
|
|
"ftbmaterials:iron_gear"
|
|
);
|
|
|
|
event
|
|
.custom({
|
|
type: "modern_industrialization:macerator",
|
|
duration: 100,
|
|
eu: 2,
|
|
item_inputs: [
|
|
{
|
|
amount: 1,
|
|
tag: "c:ingots/silver",
|
|
},
|
|
],
|
|
item_outputs: [
|
|
{
|
|
amount: 1,
|
|
item: "ftbmaterials:silver_dust",
|
|
},
|
|
],
|
|
})
|
|
.id("modern_industrialization:macerator_silver_dust");
|
|
|
|
ingot_to_dust.forEach(pair => {
|
|
const [input, output] = pair;
|
|
aa_crushing(input, output);
|
|
eio_crushing(`c:ingots/${input.split(":")[1].split("_")[0]}`, output);
|
|
});
|
|
|
|
ores_to_raw_mi.forEach(ore => {
|
|
mi_crush(`c:ores/${ore}`, `ftbmaterials:${ore}_raw_ore`, 3);
|
|
|
|
//Only Antimony and Plat require these, the rest produces duplicates.
|
|
if (ore.includes("antimony") || ore.includes("platinum")) {
|
|
mi_crush(`c:raw_materials/${ore}`, `ftbmaterials:${ore}_dust`, 2);
|
|
}
|
|
});
|
|
|
|
//Adding proper recipes for our Custom Ruby Gem
|
|
mi_crush("c:gems/ruby", "modern_industrialization:ruby_dust", 1);
|
|
aa_crushing("ftbevolution:ruby_gem", "modern_industrialization:ruby_dust");
|
|
eio_crushing("c:gems/ruby", "modern_industrialization:ruby_dust");
|
|
//Enriching Dust to Gem
|
|
event.custom({"type": "mekanism:enriching", "input": {"count": 1, "tag": "c:dusts/ruby"}, "output": {"count": 1, "id": "ftbevolution:ruby_gem"}}).id("ftbevolution:mekanism/enriching/ruby_gem");
|
|
//Implosion Compressing to Gem
|
|
event.custom({
|
|
"type": "modern_industrialization:implosion_compressor",
|
|
"eu": 1,
|
|
"duration": 10,
|
|
"item_inputs": [
|
|
{
|
|
"tag": "c:dusts/ruby",
|
|
"amount": 1
|
|
},
|
|
{
|
|
"item": "modern_industrialization:industrial_tnt",
|
|
"amount": 1
|
|
}
|
|
],
|
|
"item_outputs": {
|
|
"item": "ftbevolution:ruby_gem",
|
|
"amount": 1
|
|
}
|
|
}).id("ftbevolution:modern_industrialization/implosion_compressor/ruby_gem");
|
|
|
|
});
|