Answer the question
In order to leave comments, you need to log in
How to decompile and then recompile the jar with some changes?
There is a jar file (mod for minecraft) that I want to modify (remove some methods so that the laser does not work and you can craft a thermal centrifuge, which is prohibited on the server due to the laser). I decompiled via jd-gui and found the right class. I commented out the excess. But it is not possible to compile back (you need a whole folder). Maybe there is a program in which you can do everything at once (decompile, change, compile)? Or how?
Answer the question
In order to leave comments, you need to log in
In the development environment, include the source jar of the decompiled class as a library
Compile again as a full mod.
www.mikaellinusson.com/blog/2012/09/30/how-to-make...
If it is possible to change the classpath when the application starts, then save the changed class in a separate jar-nickname and put this jar-nickname in the classpath before the original one (which you passed).
The loader will find your class first, load it, and no longer load the original class.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question