From 58e3de420e43b664f77be393bc5f70030725c8ad Mon Sep 17 00:00:00 2001 From: Octelly Date: Fri, 1 Dec 2023 16:11:08 +0100 Subject: [PATCH 1/2] mechanical to extended crafting + some minor fixes --- .packwizignore | 9 ++++++++- index.toml | 6 +++++- kubejs/server_scripts/recipes.js | 27 +++++++++++++++++++++++++-- pack.toml | 2 +- 4 files changed, 39 insertions(+), 5 deletions(-) diff --git a/.packwizignore b/.packwizignore index 79753b3..48fe8b7 100644 --- a/.packwizignore +++ b/.packwizignore @@ -6,4 +6,11 @@ # Exclude Git/Hub stuff .github -.gitattributes \ No newline at end of file +.gitattributes + +# VSCode +.vscode + +# ProbeJS +kubejs/probe +kubejs/jsconfig.json \ No newline at end of file diff --git a/index.toml b/index.toml index d7bf330..997fb74 100644 --- a/index.toml +++ b/index.toml @@ -3967,13 +3967,17 @@ hash = "e88bc5877d8680de1389849d4ce2d0387b281d48c625379ba729e31fd6587993" file = "kubejs/data/tinkerslevellingaddon/recipes/tools/modifiers/ability/improvable.json" hash = "225830cfae9ec5ddb984a95ab4ca3dd2acfaef901de212f036b99bf8993a2cca" +[[files]] +file = "kubejs/server_scripts/0_generate_data.js" +hash = "9b90641dbaaaab223b32ffe7489a9f6cd359b4f3bc821513d8a45db415959134" + [[files]] file = "kubejs/server_scripts/0_tags.js" hash = "172360cba7fb147ba8e61251540e4e8a531a4a95a86c917e0be3c484db2ce8db" [[files]] file = "kubejs/server_scripts/recipes.js" -hash = "d952636995993ae59ace50c76e204ee2117c0d25a6011739166dd15c60917942" +hash = "58ce8a66a6c2cbe06f66adfec03da9dac39a08427684e261221cade3c5582dc2" [[files]] file = "kubejs/startup_scripts/0_globals.js" diff --git a/kubejs/server_scripts/recipes.js b/kubejs/server_scripts/recipes.js index 2292a6f..da7eb9f 100644 --- a/kubejs/server_scripts/recipes.js +++ b/kubejs/server_scripts/recipes.js @@ -65,6 +65,7 @@ onEvent('recipes', event => { andesiteMachine(event) wireless(event) misc(event) + extendedMechanicalCrafting(event) }) onEvent('item.modification', event => { @@ -232,7 +233,7 @@ function extendedCraftingSetup(event) { EC('black_iron_slate'), EC('black_iron_ingot'), EC('luminessence'), - EC('cyrstaltine_ingot'), + EC('crystaltine_ingot'), EC('enhanced_ender_ingot'), EC('ender_ingot'), EC('ender_star'), @@ -541,7 +542,6 @@ function wireless(event) { 'GEEEG', ' SBS ', ], { - D: 'fluxnetworks:flux_dust', E: 'fluxnetworks:herculean_flux_storage', S: F('#plates/steel'), G: F('#glass/colorless'), @@ -628,4 +628,27 @@ function misc(event) { ], { L: MC('#logs') }) +} + +function extendedMechanicalCrafting(event) { + event.forEachRecipe({ type: CR('mechanical_crafting') }, raw_recipe => { + const recipe = Utils.mapOf(raw_recipe.json) + console.log(recipe) + + console.log('preparing recipe key') + let key = {} + for (const [kkey, kvalue] of Object.entries(recipe.key)) { + key[kkey + ''] = Ingredient.of(kvalue) + } + + console.log('adding recipe') + const new_r_id = 'kubejs:mechanical_to_extended/' + `${raw_recipe.getOrCreateId()}`.replace(':', '/') + event.recipes.extendedcrafting.shaped_table(Ingredient.of(recipe.result), + recipe.pattern.map(row => { + return row + '' + }), + key + ).id(new_r_id) + console.log(new_r_id) + }) } \ No newline at end of file diff --git a/pack.toml b/pack.toml index 3077336..7844ffb 100644 --- a/pack.toml +++ b/pack.toml @@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0" [index] file = "index.toml" hash-format = "sha256" -hash = "43abf3c902711991bfed5499bc3c09778fe3ccc3907bd73a86c10cb581b1a3f0" +hash = "064a000aa67ce7989329fc035e692365c9b480e8898a148be48068c050cf76ca" [versions] forge = "40.2.14" From 9004126ca46682d513d86ebae9c8b1dd5b842c78 Mon Sep 17 00:00:00 2001 From: Octelly Date: Fri, 1 Dec 2023 16:23:58 +0100 Subject: [PATCH 2/2] branch weirdness i somehow caused --- index.toml | 4 ---- pack.toml | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/index.toml b/index.toml index 997fb74..7ca0e28 100644 --- a/index.toml +++ b/index.toml @@ -3967,10 +3967,6 @@ hash = "e88bc5877d8680de1389849d4ce2d0387b281d48c625379ba729e31fd6587993" file = "kubejs/data/tinkerslevellingaddon/recipes/tools/modifiers/ability/improvable.json" hash = "225830cfae9ec5ddb984a95ab4ca3dd2acfaef901de212f036b99bf8993a2cca" -[[files]] -file = "kubejs/server_scripts/0_generate_data.js" -hash = "9b90641dbaaaab223b32ffe7489a9f6cd359b4f3bc821513d8a45db415959134" - [[files]] file = "kubejs/server_scripts/0_tags.js" hash = "172360cba7fb147ba8e61251540e4e8a531a4a95a86c917e0be3c484db2ce8db" diff --git a/pack.toml b/pack.toml index 7844ffb..6aaee62 100644 --- a/pack.toml +++ b/pack.toml @@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0" [index] file = "index.toml" hash-format = "sha256" -hash = "064a000aa67ce7989329fc035e692365c9b480e8898a148be48068c050cf76ca" +hash = "4add183054e162f7e9b0aabbe6b3909ebe6eab1a5d64e38a1406c63f2edbc11d" [versions] forge = "40.2.14"