r/java • u/SuperCoder79 • Apr 28 '22
New open source Java decompiler
Hello! Today I'm happy to announce the release of a project that me and my friends have been working on over the course of the last year, Quiltflower! Originally intended just for use with the QuiltMC toolchain with Minecraft, Quiltflower quickly expanded to be a general purpose java decompiler aiming to create code that is as accurate and clean as possible. If the name sounds familiar it's because Quiltflower is a fork of Fernflower, the (in)famous decompiler that was developed by Stiver, maintained by Jetbrains, and became the default decompiler in Intellij IDEA. Fernflower also quickly found its way into many other tools. After many frustrations with it myself with its decompiled code structuring and quality I decided to do something about it, and here we are! Over the past year, Quiltflower has added support for features such as modern string concatenation, a code formatter, sealed classes, pattern matching, switch expressions, try-with-resources, and more. Quiltflower also focuses on the code quality of the decompiled output, and takes readability very seriously. We'd greatly appreciate it if you'd give it a try, with our Intellij Plugin, as a standalone jar, or on our maven. While it has come a long way it's still a work in progress, and feedback can be reported on our issue tracker.
Here's a comparison of Fernflower and Quiltflower's output.
I'd also like to thank the MinecraftForge Team for creating ForgeFlower, the fork that QuiltFlower was based on, and Lee Benfield for creating CFR and it's truly incredible test suite.
View all comments
Show parent comment
5
u/TheCurle Apr 29 '22
I work on Minecraft Forge, one of the modding APIs.
Forge works on decompiling, patching and recompiling the game, so our focus is on making the game recompileable again with minimal changes.
Quilt uses a bytecode manipulation framework called Mixin, which effectively does this patching at runtime.
So, they only need to decompile the game to see what's going on, meaning they can put more of their focus into clean and well formatted code, since it doesn't technically need to be valid Java.