it works! added priority and removed extra crap
This commit is contained in:
@@ -1,50 +1,18 @@
|
|||||||
const toggle = false;
|
// priority: 12
|
||||||
|
|
||||||
|
const toggle = true;
|
||||||
|
|
||||||
ServerEvents.recipes(e => {
|
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) {
|
if (toggle) {
|
||||||
console.warn("RECIPE DUMPING IS TURNED ON, THIS WILL DUMP JSON DATA OF ALL OF THE RECIPES IN THE GAME, WILL LAG");
|
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]}))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user