From fc4860b8d52d295acfe1411ed9d78b9182eaf3aa Mon Sep 17 00:00:00 2001 From: copygirl Date: Sat, 30 Jul 2022 21:54:47 +0200 Subject: [PATCH] Unify dough --- .../client_scripts/hide/unification/dough.js | 5 +++ kubejs/server_scripts/unification/dough.js | 45 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 kubejs/client_scripts/hide/unification/dough.js create mode 100644 kubejs/server_scripts/unification/dough.js diff --git a/kubejs/client_scripts/hide/unification/dough.js b/kubejs/client_scripts/hide/unification/dough.js new file mode 100644 index 0000000..f75201e --- /dev/null +++ b/kubejs/client_scripts/hide/unification/dough.js @@ -0,0 +1,5 @@ +// priority: 0 + +onEvent("jei.hide.items", event => { + event.hide("farmersdelight:wheat_dough"); +}); diff --git a/kubejs/server_scripts/unification/dough.js b/kubejs/server_scripts/unification/dough.js new file mode 100644 index 0000000..16017ed --- /dev/null +++ b/kubejs/server_scripts/unification/dough.js @@ -0,0 +1,45 @@ +// priority: 0 + +onEvent("recipes", event => { + // CUTTING: Wheat with Knife = Wheat Flour + event.custom({ + type: "farmersdelight:cutting", + ingredients: [{ item: "minecraft:wheat" }], + tool: { tag: "forge:tools/knives" }, + result: [{ item: "create:wheat_flour" }] + }); + // CRAFTING: Wheat Flour + Eggs = Dough + event.shapeless("create:dough", [ "create:wheat_flour", "#forge:eggs" ]); + // CUTTING: Dough with Knife = Raw Pasta + event.custom({ + type: "farmersdelight:cutting", + ingredients: [{ tag: "forge:dough/wheat" }], + tool: { tag: "forge:tools/knives" }, + result: [{ item: "farmersdelight:raw_pasta" }] + }); + // COOKING: Dumplings + event.custom({ + type: "farmersdelight:cooking", + ingredients: [ + { tag: "forge:dough/wheat" }, + { tag: "forge:crops/cabbage" }, + { tag: "forge:crops/onion" }, + [ + { tag: "forge:raw_chicken" }, + { tag: "forge:raw_pork" }, + { tag: "forge:raw_beef" }, + { item: "minecraft:brown_mushroom" } + ] + ], + result: { item: "farmersdelight:dumplings", count: 2 }, + experience: 0.35, + cookingtime: 200 + }); + // Remove any recipes involving wheat dough. + event.remove({ input: "farmersdelight:wheat_dough" }); + event.remove({ output: "farmersdelight:wheat_dough" }); +}); + +onEvent("item.tags", event => { + event.removeAllTagsFrom("farmersdelight:wheat_dough"); +});