HyperCubeMC / Modern-Minecraft-Decompiler

Modern Minecraft Decompiler
https://the-hyperzone.github.io/Modern-Minecraft-Decompiler/
MIT License
60 stars 8 forks source link

Compiling to Jar File #8

Closed Justsnoopy30 closed 4 years ago

Justsnoopy30 commented 4 years ago

@ahmed605 How do you compile this into a jar file again?

ahmed605 commented 4 years ago

run Build task

Justsnoopy30 commented 4 years ago

Where exactly in the Gradle tasks is it?

ahmed605 commented 4 years ago

run MCD -> MCD -> Tasks -> Build -> Build then the release jar will be in the "build/libs/"

Justsnoopy30 commented 4 years ago

@ahmed605 Crashing on launch

ahmed605 commented 4 years ago

the log?

Justsnoopy30 commented 4 years ago

Short Error:

The game crashed whilst initializing game Error: java.lang.NullPointerException: "in" is null!

Justsnoopy30 commented 4 years ago

@ahmed605

Justsnoopy30 commented 4 years ago

Full Error: https://pastebin.com/SUDgYZ2n

Justsnoopy30 commented 4 years ago

@ahmed605

ahmed605 commented 4 years ago

try to build another jar and but assets and data to it without deleting META-INF

Justsnoopy30 commented 4 years ago

Will try, my IntelliJ is starting up.

Justsnoopy30 commented 4 years ago

@ahmed605 Didn't work, same error.

Justsnoopy30 commented 4 years ago

But I opened up MANIEFEST.MF in META-INF and it only contains 1 line: Manifest-Version: 1.0

Justsnoopy30 commented 4 years ago

Also, I noticed

Missing version information!

in the log.

ahmed605 commented 4 years ago

Did you created the json or used the original one without changes

Justsnoopy30 commented 4 years ago

Copied 1.14.4.json and removed download, Sha, and size of jar.

Justsnoopy30 commented 4 years ago

I think it might have to do with MethodsReturnNotNull.class in mcp folder, maybe it is not working because looking at the error log shows methods are returning null.

Justsnoopy30 commented 4 years ago

Aha! I think I finally figured out the entire issue, testing...

Justsnoopy30 commented 4 years ago

Nope, that didn't work, in the json file I tried changing the line that said mainClass:net.minecraft.main.Main to mainClass:mcp.client.Start and now it crashes with this:

Exception in thread "main" joptsimple.MultipleArgumentsForOptionException: Found multiple arguments for option version, but you asked for only one at joptsimple.OptionSet.valueOf(OptionSet.java:179) at net.minecraft.client.main.Main.getValue(Main.java:134) at net.minecraft.client.main.Main.main(Main.java:96) at mcp.client.Start.main(Start.java:17)

Justsnoopy30 commented 4 years ago

@ahmed605 When are you ever gonna respond...?

ahmed605 commented 4 years ago

Sorry I'm very busy this error because the arguments of jar and JRE system is not correct so copy the arguments from mcd from your IDE

Justsnoopy30 commented 4 years ago

Oh ok. But wait, it's a Friday, how can you be busy on a friday? :P

Justsnoopy30 commented 4 years ago

Also, I figured out the issue. I tested a modified version of mcp that works past 1.13+ and guess what, I got the exact same error. The mcp_snapshot is 1.14.3 and hasn't been updated to 1.14.4 (maybe because of officially released obfuscation maps?) and when 1.14.4 came, of course, there were code changes, and since mcp_snapshot is still 1.14.3, they don't match up right, and hence, our error.

Justsnoopy30 commented 4 years ago

Nope, nevermind, it is not that either, tried 1.14.3 and same.

Justsnoopy30 commented 4 years ago

OMG I FEEL SO STUPID. I solved the issue. Apparently, when adding in the assets and data folders from the official jar, there is a pack.mcmeta and pack.png hidden in at the bottom with the rest of the obfuscated class files, and I needed to add that to my jar.

ahmed605 commented 4 years ago

You're NOT stupid this is a small error that can happen to anyone BTW I replied to you on Friday because I'm not busy on Friday but I'm very busy on other week days because of school

Justsnoopy30 commented 4 years ago

Ok. I'm gonna add this to the wiki in case someone else has the same problem.

Justsnoopy30 commented 4 years ago

(Soon)