hube12 / DecompilerMC

This repository allows you to decompile any minecraft version that was published after 19w36a without any 3rd party mappings, you just need to execute the script or the executable (see releases)! Thanks mojang to have published proguard mappings

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fern Flower decompile method "not silent dunno why"

JosephMillsAtWork opened this issue · comments

print('=== Decompiling using FernFlower (not silent dunno why) ===')

Change

    print('=== Decompiling using FernFlower ===')

subprocess.run(['java', "-Xmx1G", "-Xms1G","-jar", fernflower.__str__(), "-hes=0 -hdc=0 -dgs=1 -ren=1 -log=WARN", path.__str__(), f'./src/{decompVersion}/{type}'], check=True)

Change to

        subprocess.run([ 
                                      'java', 
                                     '-Xmx1G',
                                     '-Xms1G',
                                     '-jar', 
                                     fernflower.__str__(),
                                     '-hes=0', 
                                     '-hdc=0', 
                                     '-dgs=1',
                                     '-ren=1',
                                     '-log=WARN' ,
                                    path.__str__(),
                                     f'./src/{decompVersion}/{type}' 
                                   ], check=True)

Just notice the array for the sub sub process. changing each of fern flowers options to stings and pushing them back to the array.

I noticed this after altering for the -log options(TRACE) and adding some and removing some on my local copy. That things where not working as intended.

Then I understood what the
"not silent dunno why"
thing is about,
...
I think

Maybe change the -Xmx1G to a global var but that is for another issue

FWIW Here is what I have if you like for FF side of things.

        subprocess.run([ 'java',
                                   max_mem.__str__(),  
                                   min_mem.__str__(),
                                   '-jar',
                                   fernflower.__str__(),
                                   '-dgs=1',
                                   '-lit=1',
                                   '-rbr=1',
                                   '-din=1',
                                   '-asc=1',
                                   '-udv=1',
                                   '-rsy=1',
                                   '-nls=1',
                                   '-log=WARN',
                                   path.__str__(),
                                   f'./src/{decompVersion}/{type}'], check=True)
commented

Indeed, this tool was made so quickly that i didn't realize that i was using wrongfully Subprocess, i will push the changes, thanks for reporting it