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?
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.
So it’s impossible or can I use it by using Hexcode?
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.
can you do this with the help of the cmd?
I’m sorry, I can’t help because I don’t use IntelliJ. Vlt. hid that https://intellij-support.jetbrains.com/hc/en-us/community/posts/6061217524626-How-to-decompile-and-debug-a-jar-file
can you tell me exactly what to do if I have a jar datei and have IntelliJ open?
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.
But I have the jar datei of Curseforge isn’t it?