Edit class file of a Minecraft mod?

I have a Minecraft mod whose class file I want to edit. I've already decompiled the class file using IntelliJ, copied the code, pasted it into a Java file, and then tried to convert the file back to a class file using the CMD command javac, but unfortunately, it failed due to numerous errors: pastebin.com/raw/mEktYJrZ (the CMD output). Is there any way to fix the errors or edit the class file differently?

(1 votes)
Loading...

Similar Posts

Subscribe
Notify of
8 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
regex9
11 months ago

The class depends on other packages (from the mod) that you logically lack when compiling.

You need the Java code of the complete mod (including its dependencies on other libraries or the like). In this you can replace the class, then you can recompile the program.

Suiram1
11 months ago
Reply to  Enderking384

You could, for example, look for the mod on GitHub to get the complete source code or you could decompile the sammed .jar to get to everything.

Suiram1
11 months ago
Suiram1
11 months ago

Of course, you can decompile it, but I would say that it is best if you look at GitHub for the first time to find the mod there, because there could be the uncompleted source code from the mod.