MaxPixelStudios / MinecraftDecompiler

Minecraft Decompiler. A useful tool/library to deobfuscate and decompile Minecraft(or any jar file) through popular mappings and various decompilers. Or use it as a lib to process obfuscation mappings such as converting a mapping to another format
GNU General Public License v3.0
306 stars 17 forks source link

[Enhancement] Add a cli option to output the java source files insted of a jar file #165

Closed Coolchickenguy closed 2 days ago

Coolchickenguy commented 2 days ago

Is your enhancement related to a problem? Please describe. I am working on a minecraft server, and I need to decompile mojang's server to see how world generation works. This repo has been very useful, but I would like to not have to decompile the result.

Describe the solution you'd like Adding a cli option to output the java source files of the minecraft jar to a folder

Describe alternatives you've considered None.

Additional context None.

XiaoPangxie732 commented 2 days ago

-d may be the thing you want

Coolchickenguy commented 2 days ago

That works! Thanks!

Coolchickenguy commented 2 days ago

Just asking, what is the best option for -d? I used fernflower, but it spammed the terminal with error messages.

XiaoPangxie732 commented 2 days ago

the default(just -d) is the best option and it uses Vineflower also, you can use the snapshot version(download here), it contains a newer version of the decompiler

Coolchickenguy commented 2 days ago

Vineflower crashed halfway when I used it. ( I have 3 gigs of ram so that is something to be expected )

XiaoPangxie732 commented 2 days ago

you can try the snapshot version above, it uses a newer version of vineflower which has an optimized memory usage but I don't know whether 3 GB RAM is enough

Coolchickenguy commented 2 days ago

Ok I will use my computer with 16 gigs.Edit: that was enough, turns out I did not set the java heap size.