diff --git a/kubejs/server_scripts/HarmoniousEngineering/_global.js b/kubejs/server_scripts/HarmoniousEngineering/_global.js index 6701013..80322ee 100644 --- a/kubejs/server_scripts/HarmoniousEngineering/_global.js +++ b/kubejs/server_scripts/HarmoniousEngineering/_global.js @@ -169,4 +169,69 @@ onEvent('server.datapack.first', _ => { evt.custom({type: type, pattern: pattern, key: key, result: result}); }); }; + + /** + * @param {IngredientJS} input + * @param {ItemStackJS} output + * @param {int | null} timeScale A scalar for how long the processing should take. + */ + global.genUniversalCrushingRecipe = (evt, input, output, timeScale) => { + const main = JSON.parse(input.toJson()); + const t = timeScale || 1; + + evt.custom({ + type: 'immersiveengineering:crusher', + input: main, + result: { + count: output.getCount(), + base_ingredient: {item: output.getId()}, + }, + energy: 1500 * t, + }); + + evt.custom({ + type: 'create:milling', + ingredients: [main], + results: [ + { + item: output.getId(), + count: output.getCount(), + }, + ], + processingTime: 500 * t, + }); + + evt.custom({ + type: 'create:crushing', + ingredients: [main], + results: [ + { + item: output.getId(), + count: output.getCount(), + }, + ], + processingTime: 400 * t, + }); + + evt.custom({ + type: 'mekanism:crushing', + input: {ingredient: main}, + output: { + item: output.getId(), + count: output.getCount(), + }, + }); + + evt.custom({ + type: 'thermal:pulverizer', + ingredient: main, + result: [ + { + item: output.getId(), + count: output.getCount(), + }, + ], + experience: 0, + }); + }; }); diff --git a/kubejs/server_scripts/HarmoniousEngineering/recipes/_custom.js b/kubejs/server_scripts/HarmoniousEngineering/recipes/_custom.js index 786eb06..afdb6dd 100644 --- a/kubejs/server_scripts/HarmoniousEngineering/recipes/_custom.js +++ b/kubejs/server_scripts/HarmoniousEngineering/recipes/_custom.js @@ -483,25 +483,18 @@ onEvent('recipes', event => { multiservoPress(event); stonecutter(event); woodcutter(event); + global.genUniversalCrushingRecipe( + event, + Ingredient.of('betternether:glowstone_stalactite'), + Item.of('8x minecraft:glowstone_dust'), + null + ); // Ender Singularity Crafting event.custom({ type: 'thermal:chiller', - ingredients: [ - { - fluid: 'minecraft:water', - amount: 1000, - }, - { - item: 'powah:ender_core', - }, - ], - result: [ - { - item: 'kubejs:ender_singularity', - count: 1, - }, - ], + ingredients: [{fluid: 'minecraft:water', amount: 1000}, {item: 'powah:ender_core'}], + result: [{item: 'kubejs:ender_singularity', count: 1}], energy: 20000, });