it works! added priority and removed extra crap
This commit is contained in:
@@ -1,18 +1,11 @@
|
||||
const toggle = false;
|
||||
// priority: 12
|
||||
|
||||
const toggle = true;
|
||||
|
||||
ServerEvents.recipes(e => {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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 recipes=[];
|
||||
e.forEachRecipe({},r=>{
|
||||
// console.log("recipe",r.json.toString())
|
||||
@@ -21,30 +14,5 @@ ServerEvents.recipes(e => {
|
||||
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();
|
||||
|
||||
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