Make a command like const types = BeeModParser.readModType(path) in which it outputs in console.log(types) a JSON (or array) like:
{
"forge": {
"count":"2",
"contents":{
"mods":["Optifine.jar","LabyMod.jar"],
//corresponding position of mc version of mods as in modnames
"mcversion":["1.16.5", "1.12"]
}
},
"fabric": {
"count":"2",
"contents":{
"mods":["Sodium.jar","Litematica.jar"],
//corresponding position of mc version of mods as in modnames
"mcversion":["1.16.2", "1.16.4"]
}
},
"liteloader": {
"count":"2",
"contents":{
"mods":["mod1.jar","mod2.jar"],
//corresponding position of mc version of mods as in modnames
"mcversion":["1.16.5", "1.12"]
}
}
}
It can be very useful like if we want to do:
console.log(`${types.forge.count} mods for forge:`);
for (i=0;i<types.forge.mods.length;i++) {
console.log(`${types.forge.mods[i]} of MC version: ${types.forge.mods.mcversion[i]}`);
}
console.log(`${types.fabric.count} mods for fabric:`);
for (i=0;i<types.fabric.mods.length;i++) {
console.log(`${types.fabric.mods[i]} of MC version: ${types.fabric.mods.mcversion[i]}`);
}
console.log(`${types.liteloader.count} mods for LiteLoader:`);
for (i=0;i<types.liteloader.mods.length;i++) {
console.log(`${types.liteloader.mods[i]} of MC version: ${types.liteloader.mods.mcversion[i]}`);
}
``` and alot more stuff is possible by it
Make a command like
const types = BeeModParser.readModType(path)
in which it outputs inconsole.log(types)
a JSON (or array) like:It can be very useful like if we want to do: