diff --git a/minecraft/kubejs/server_scripts/recipedump.js b/minecraft/kubejs/server_scripts/recipedump.js index 97e2f01..134a1eb 100644 --- a/minecraft/kubejs/server_scripts/recipedump.js +++ b/minecraft/kubejs/server_scripts/recipedump.js @@ -1,50 +1,18 @@ -const toggle = false; +// priority: 12 + +const toggle = true; ServerEvents.recipes(e => { - - - - - - - - - - - - let recipes=[]; - e.forEachRecipe({},r=>{ - // console.log("recipe",r.json.toString()) - recipes.push(JSON.parse(r.json.toString())); - }); - let recipe=JSON.stringify(recipes); - console.log(recipe); - - - - - - - if (toggle) { console.warn("RECIPE DUMPING IS TURNED ON, THIS WILL DUMP JSON DATA OF ALL OF THE RECIPES IN THE GAME, WILL LAG"); - let rec = e.getRecipes(); + let recipes=[]; + e.forEachRecipe({},r=>{ + // console.log("recipe",r.json.toString()) + recipes.push(JSON.parse(r.json.toString())); + }); + let recipe=JSON.stringify(recipes); + console.log(recipe); - for (let k in rec) { - let value = []; - try { - for (let i of rec[k]){ - try { - value.push(i.json.toString()); - } catch (err) {console.log(".");} - - } - } catch (err) {console.log("unknown obj: " + JSON.stringify(rec[k]));} - - - - console.log(JSON.stringify({key:k,val:rec[k]})) - } } });