Fix annoying decompilation issue

This commit is contained in:
Reece Wilson 2021-09-26 06:33:36 +01:00
parent d662a55323
commit 9acdcf0ff5
2 changed files with 9 additions and 2 deletions

View File

@ -16,10 +16,17 @@ function unlink(path) {
} catch (e) {}
}
function unlinkRecursive(path) {
try {
fs.rmdirSync(path, {recursive: true} )
return true
} catch (e) { console.log(e) }
}
async function re() {
unlinkRecursive(modBuilding)
mkdir(modBuilding)
await require("./Exec.js").exec(`java -Xmx4G -Xms1G -jar lib\\FernFlower.jar -hes=1 -hdc=1 -dgs=1 -ren=0 -lit=0 -nns=0 -asc=1 -rbr=1 ./data/${ver}-Mapped.jar ${modBuilding}`)
await require("./Exec.js").exec(`java -Xmx4G -Xms1G -jar lib\\FernFlower.jar -hes=1 -hdc=1 -dgs=1 -ren=0 -lit=0 -nns=0 -asc=1 -rbr=1 -log=WARN ./data/${ver}-Mapped.jar ${modBuilding}`)
let sources = `${modBuilding}/${ver}-Mapped.jar`
await fs.createReadStream(sources).pipe(unzip.Extract({ path: modBuilding })).promise()

View File

@ -1,2 +1,2 @@
let ver = require("./config.json").version
require("./Exec.js").exec(`java -jar lib\\SpecialSource.jar -srg-in=.\\data\\${ver}.txt --in-jar=.\\data\\${ver}.jar -o=.\\data\\${ver}-Mapped.jar`)
require("./Exec.js").exec(`java -jar lib\\SpecialSource.jar -srg-in=.\\data\\${ver}.txt --kill-lvt --in-jar=.\\data\\${ver}.jar -o=.\\data\\${ver}-Mapped.jar`)