Fellies/kubejs[copied]/server_scripts/fellies/kubejs/base/recipes/replace_input.js

312 lines
12 KiB
JavaScript
Raw Normal View History

2021-01-24 16:10:27 +00:00
events.listen('recipes', function (event) {
2021-01-26 10:32:42 +00:00
event.replaceInput({}, 'refinedstorage:silicon', '#forge:silicon');
event.replaceInput({}, 'thermal:cinnabar', '#forge:gems/cinnabar');
event.replaceInput({}, 'thermal:sulfur', '#forge:gems/sulfur');
event.replaceInput({}, 'thermal:apatite', '#forge:gems/apatite');
event.replaceInput({}, 'thermal:niter', '#forge:gems/niter');
event.replaceInput({}, 'thermal:bitumen', '#forge:gems/bitumen');
event.replaceInput({}, 'thermal:coal_coke', '#forge:gems/coal_coke');
event.replaceInput({}, 'rftoolsbase:dimensionalshard', '#forge:gems/dimensional');
event.replaceInput({}, '#forge:fillet_knife', '#forge:tools/knife');
event.replaceInput({}, '#farmersdelight:tools/knife', '#forge:tools/knife');
event.replaceInput({}, 'immersivepetroleum:bitumen', '#forge:gems/bitumen');
event.replaceInput({}, 'ars_nouveau:mana_gem', '#forge:gems/mana');
event.replaceInput({}, 'immersiveengineering:slag', '#forge:slag');
event.replaceInput({}, 'thermal:slag', '#forge:slag');
event.replaceInput({}, 'farmersdelight:fried_egg', '#forge:cooked_eggs');
event.replaceInput({ type: 'minecraft:crafting_shaped' }, 'powah:uraninite', '#forge:ingots/radioactive');
event.replaceInput({ id: 'tetra:hammer/stone' }, 'minecraft:cobblestone', '#quark:stone_tool_materials');
event.replaceInput({ id: 'dustrial_decor:sheet_metal' }, '#forge:ingots/iron', '#forge:plates/iron');
event.replaceInput({ mod: 'buildinggadgets' }, '#forge:ingots/iron', '#forge:ingots/iron_aluminum');
event.replaceInput({ mod: 'powah' }, '#forge:ingots/iron', '#forge:ingots/iron_copper');
event.replaceInput({ mod: 'powah' }, '#forge:nuggets/iron', '#forge:nuggets/iron_copper');
event.replaceInput({ mod: 'astralsorcery' }, 'astralsorcery:marble_raw', '#forge:stones/marble');
2021-01-24 16:10:27 +00:00
2021-01-26 10:32:42 +00:00
event.replaceInput(
{ type: 'minecraft:crafting_shaped', output: 'minecraft:piston' },
'#forge:cobblestone',
'#quark:stone_tool_materials'
);
2021-01-24 16:10:27 +00:00
2021-01-26 10:32:42 +00:00
['quark:tallow'].forEach((tallow) => {
event.replaceInput({}, tallow, '#forge:tallow');
});
2021-01-24 16:10:27 +00:00
2021-01-26 10:32:42 +00:00
event.replaceInput(
{ id: 'dustrial_decor:iron_bar_trapdoor' },
'minecraft:iron_bars',
'dustrial_decor:barbed_iron_bars'
);
2021-01-24 16:10:27 +00:00
2021-01-26 10:32:42 +00:00
event.replaceInput(
{ id: 'bloodmagic:alchemytable/basic_cutting_fluid' },
'minecraft:potion',
item.of('minecraft:potion', { Potion: 'minecraft:water' })
);
2021-01-24 16:10:27 +00:00
2021-01-26 10:32:42 +00:00
event.replaceInput(
{ id: 'create:mixing/chromatic_compound' },
'create:powdered_obsidian',
ingredient.of('#forge:dusts/obsidian')
);
2021-01-24 16:10:27 +00:00
2021-01-26 10:32:42 +00:00
colors.forEach((color) => {
var dyeTag = `#forge:dyes/${color}`;
2021-01-24 16:10:27 +00:00
2021-01-26 10:32:42 +00:00
// Replaces recipes not using forge:dyes tag for inputs
event.replaceInput({}, `minecraft:${color}_dye`, dyeTag);
2021-01-24 16:10:27 +00:00
2021-01-26 10:32:42 +00:00
event.remove({
id: `minecraft:${color}_carpet_from_white_carpet`
});
event.shaped(Item.of(`minecraft:${color}_carpet`, 3), ['WW'], {
W: `minecraft:${color}_wool`
});
2021-01-24 16:10:27 +00:00
2021-01-26 10:32:42 +00:00
event.shaped(Item.of(`minecraft:${color}_stained_glass_pane`, 8), ['GGG', 'GDG', 'GGG'], {
G: 'minecraft:glass_pane',
D: dyeTag
});
2021-01-24 16:10:27 +00:00
2021-01-26 10:32:42 +00:00
event.shaped(Item.of(`minecraft:${color}_stained_glass`, 8), ['GGG', 'GDG', 'GGG'], {
G: 'minecraft:glass',
D: dyeTag
});
2021-01-24 16:10:27 +00:00
2021-01-26 10:32:42 +00:00
['stained_glass', 'stained_glass_pane', 'terracotta', 'concrete_powder', 'wool', 'carpet'].forEach(
(blockName) => {
var itemTag = `#forge:${blockName}`;
var block = `minecraft:${color}_${blockName}`;
2021-01-24 16:10:27 +00:00
2021-01-26 10:32:42 +00:00
if (blockName === 'stained_glass_pane') {
event.remove({ id: `${block}_from_glass_pane` });
} else {
event.remove({ id: block });
}
2021-01-24 16:10:27 +00:00
2021-01-26 10:32:42 +00:00
event.shaped(Item.of(block, 8), ['SSS', 'SDS', 'SSS'], {
S: itemTag,
D: dyeTag
});
event.shapeless(Item.of(block, 1), [dyeTag, itemTag]);
}
);
event.shapeless(Item.of(`minecraft:${color}_concrete_powder`, 8), [
dyeTag,
'#forge:sand',
'#forge:sand',
'#forge:sand',
'#forge:sand',
'#forge:gravel',
'#forge:gravel',
'#forge:gravel',
'#forge:gravel'
]);
});
var data = {
recipes: [
{
type: 'storage_blocks',
replace: 'iron',
replaceWith: 'aluminum',
items: [
'bloodmagic:soulforge',
'mininggadgets:upgrade_fortune_1',
'resourcefulbees:centrifuge_casing',
'xnet:antenna_base'
]
},
{
type: 'storage_blocks',
replace: 'iron',
replaceWith: 'brass',
items: ['ars_nouveau:glyph_press']
},
{
type: 'storage_blocks',
replace: 'iron',
replaceWith: 'invar',
items: ['resourcefulbees:centrifuge_controller']
},
{
type: 'storage_blocks',
replace: 'iron',
replaceWith: 'lead',
items: ['thermal:machine_press', 'bloodmagic:alchemicalreactionchamber']
},
{
type: 'dusts',
replace: 'gold',
replaceWith: 'copper',
items: ['mekanism:upgrade_energy']
},
{
type: 'gears',
replace: 'gold',
replaceWith: 'bronze',
items: ['thermal:upgrade_augment_1']
},
{
type: 'gears',
replace: 'gold',
replaceWith: 'copper',
items: ['thermal:flux_drill', 'thermal:flux_saw']
},
{
type: 'gears',
replace: 'gold',
replaceWith: 'silver',
items: ['thermal:dynamo_lapidary']
},
{
type: 'ingots',
replace: 'gold',
replaceWith: 'brass',
items: [
'ars_nouveau:arcane_core',
'ars_nouveau:crystallizer',
'ars_nouveau:volcanic_accumulator',
'pneumaticcraft:gun_ammo',
'ars_nouveau:marvelous_clay'
]
},
{
type: 'ingots',
replace: 'gold',
replaceWith: 'bronze',
items: [
'bloodmagic:alchemytable',
'bloodmagic:altar',
'bloodmagic:sacrificialdagger',
'bloodmagic:experiencebook',
'bloodmagic:soulforge',
'pneumaticcraft:medium_tank',
'pneumaticcraft:minigun',
'pneumaticcraft:pressure_gauge',
'thermal:diving_helmet',
'thermal:diving_chestplate',
'thermal:diving_leggings',
'thermal:diving_boots',
'minecraft:clock'
]
},
{
type: 'ingots',
replace: 'gold',
replaceWith: 'copper',
items: [
'mekanismgenerators:electromagnetic_coil',
'mekanism:energy_tablet',
'mininggadgets:upgrade_magnet',
'xnet:controller',
'thermal:rf_coil_xfer_augment',
'thermal:rf_coil_storage_augment',
'thermal:rf_coil_augment',
'thermal:rf_coil',
'rftoolsstorage:storage_scanner',
'rftoolsbuilder:shield_block1',
'pneumaticcraft:vortex_tube',
'pneumaticcraft:heat_sink',
'xnet:connector_blue',
'xnet:connector_red',
'xnet:connector_green'
]
},
{
type: 'ingots',
replace: 'gold',
replaceWith: 'silver',
items: ['torchmaster:feral_flare_lantern', 'mekanism:teleportation_core']
},
{
type: 'ingots',
replace: 'gold',
replaceWith: 'tin',
items: ['pneumaticcraft:memory_stick']
},
{
type: 'ingots',
replace: 'iron',
replaceWith: 'aluminum',
items: [
'immersiveengineering:conveyor_splitter',
'immersiveengineering:conveyor_vertical',
'immersiveengineering:conveyor_basic',
'immersiveengineering:current_transformer',
'immersiveengineering:transformer_hv',
'immersiveengineering:transformer',
'immersiveengineering:dynamo',
'immersiveengineering:furnace_heater',
'immersiveengineering:toolupgrade_drill_lube',
'cookingforblockheads:preservation_chamber',
'minecraft:compass',
'minecraft:piston',
'xnet:antenna_dish',
'xnet:antenna_base',
'xnet:antenna',
'transport:fluid_loader',
'resourcefulbees:centrifuge_casing',
'engineersdecor:metal_bar'
]
},
{
type: 'ingots',
replace: 'iron',
replaceWith: 'brass',
items: ['ars_nouveau:mana_condenser', 'ars_nouveau:enchanting_apparatus']
},
{
type: 'ingots',
replace: 'iron',
replaceWith: 'copper',
items: [
'immersiveengineering:charging_station',
'cookingforblockheads:heating_unit'
]
},
{
type: 'ingots',
replace: 'iron',
replaceWith: 'tin',
items: ['bloodmagic:soulsnare']
},
{
type: 'nuggets',
replace: 'gold',
replaceWith: 'bronze',
items: ['rftoolsstorage:storage_module0']
},
{
type: 'nuggets',
replace: 'gold',
replaceWith: 'copper',
items: [
'xnet:connector_routing',
'xnet:netcable_routing',
'xnet:netcable_yellow',
'xnet:netcable_blue',
'xnet:netcable_green',
'xnet:netcable_red',
'rftoolsbase:machine_base',
'rftoolsbase:machine_frame',
'rftoolscontrol:card_base'
]
}
]
};
2021-01-24 16:10:27 +00:00
2021-01-26 10:32:42 +00:00
data.recipes.forEach((recipe) => {
recipe.items.forEach((item) => {
event.replaceInput(
{ output: item },
'#forge:' + recipe.type + '/' + recipe.replace,
'#forge:' + recipe.type + '/' + recipe.replace + '_' + recipe.replaceWith
);
});
});
2021-01-24 16:10:27 +00:00
2021-01-26 10:32:42 +00:00
//TODO: Remove in 0.4.0
event.replaceInput({ id: 'quantumstorage:chestgold' }, 'quantumstorage:chestiron', '#forge:storage_blocks/iron');
event.replaceInput({ id: 'quantumstorage:chestdiamond' }, 'quantumstorage:chestgold', '#forge:storage_blocks/gold');
2021-01-24 16:10:27 +00:00
});