Hexeption / MCP-Reborn

MCP-Reborn is an MCP (Mod Coder Pack) for Minecraft for making modded clients and researching its code. (1.13-1.20.1)
Other
1.07k stars 135 forks source link

Having issues getting this to work in the launcher #28

Closed KdotDevelopment closed 4 years ago

KdotDevelopment commented 4 years ago

I used to be able to do this sort of stuff like 5 years ago, but since then stuff has changed. I need to be able to change the json file in the versions folder so it will actually run. I followed a tutorial for doing this, but it was dated for 1.12.2 and things have changed. I wanna know how to make the json so it works with my mod. Im confused as the jar file this generates isnt how the regular minecraft files look like. For instance, the regular files have hundreds of class files when you open it. This one does not. How is the launcher even supposed to know what to do with this?

If anyone can walk me through this, that would be awesome!

Edit: i did a thing to the json file, and now its telling me there is a JNI error or something. Im starting to think this isnt meant to be used in the launcher.

ethanjamesauto commented 4 years ago

The reason the jar has everything in folders is because as far as I know, mcp-reborn doesn't obfuscate the class files. This is a big issue, but you can still run the game in the launcher without it. Go to your appdata folder, then go to C:\Users\your_username.gradle\caches\forge_gradle\minecraft_repo\versions\1.15.2\client-extra.jar You can also find this in your external dependencies in eclipse, or possibly intelliJ. Use something like 7zip or WinRAR to open up your built jar, and then copy and paste everything except for the META-INF folder from client-extra into your built jar file.

KdotDevelopment commented 4 years ago

It continues to say a JNI error has occurred. I am using a json file I found on the discord thingy and I named all of the files according to that file. I copied all the files (except META-INF) into my built jar.

ethanjamesauto commented 4 years ago

It continues to say a JNI error has occurred. I am using a json file I found on the discord thingy and I named all of the files according to that file. I copied all the files (except META-INF) into my built jar.

Can you open up your launcher log (it's in the settings) and tell me what the error Is? My first guess would be compiling with the wrong version of jdk.

KdotDevelopment commented 4 years ago

https://imgur.com/a/KhLi9KK my guess is that my json file is incorrect

ethanjamesauto commented 4 years ago

Your log is weird, as you say that a JNI error has occured, but it doesn't appear in the log. Anyways, you can try out my .json file here: https://pastebin.com/MFAHARDe Make sure you .jar is named mcp-reborn-1.0.0.jar.

KdotDevelopment commented 4 years ago

https://imgur.com/a/Pr1c3gI

do i need to get a sha1 checksum of the jar? and if so, where do i put it?

ethanjamesauto commented 4 years ago

The exception that you got is the problem. The other errors are not fatal. You need to be using jdk8. I assume you are using jdk14. Download and install jdk8, run java -version to make sure you are running version 8, and then rebuild your jar file.

KdotDevelopment commented 4 years ago

do you by chance have a copy of jdk8 because oracle wants me to have an account since the version is so old. I dont want to give oracle so much info for the account (address, phone, etc)

ethanjamesauto commented 4 years ago

Sure do. This is the jdk itself, not the installer, so you'll need to do this: https://warwick.ac.uk/fac/sci/dcs/people/research/csrcbc/teaching/howto/javapath/ If you run Windows 10, editing the path will be easier, as it shows a list of items instead of a single line separated by semicolons. However, you don't need to deal with all of the bloat that the installer puts in your pc. Here's the download: https://drive.google.com/file/d/1xWp94mNGaCCrQESSRvJKljZIKQa96M_0/view?usp=sharing

ethanjamesauto commented 4 years ago

Just make sure to add the bin folder in the jdk to the system path. Run java -version to make sure it worked. You might need to restart your pc.

triggered1997 commented 4 years ago

The reason the jar has everything in folders is because as far as I know, mcp-reborn doesn't obfuscate the class files. This is a big issue, but you can still run the game in the launcher without it. Go to your appdata folder, then go to C:\Users\your_username.gradle\caches\forge_gradle\minecraft_repo\versions\1.15.2\client-extra.jar You can also find this in your external dependencies in eclipse, or possibly intelliJ. Use something like 7zip or WinRAR to open up your built jar, and then copy and paste everything except for the META-INF folder from client-extra into your built jar file.

thanks this helped me out a lot