So I got everything decompiled with MCP-reborn with no issues and first step is just to compile a new version of MC with no changes (I'm using Intellij). Runclient brings up Minecraft no problem. Unfortunately, when I go to do multiplayer, it gives me an error (of course) because I'm not starting it through the launcher.
So I took a look at the versions folder for the official launcher. I already have fabric-loader installed so I tried copying the json from that and modifying it with values that were appropriate to my .jar file. Looked good at first but, of course, the launcher had actually overwritten the .jar file with the official one. I figured it had to know which version to replace it with so I took out the "inheritsFrom" line but now it just crashes (exit code 0).
So can anyone tell me how to run my modded client with logging in? It doesn't particularly matter how though obviously, one that integrates with the original launcher would be preferred.I have tried searching for the answer for this but mostly what I've come up with is really old and out-of-date stuff. I'm not even asking for a detailed answer but if anyone can point me in the right direction, it would be much appreciated.
In order to create a new custom version you just copy the json from the version that you want to modify and rename it and the "id" inside, then delete the entire "downloads" section which includes "client.jar", which is how I made the json for my own custom version (based on 1.6.4 but all versions work the same, all filenames/paths given are those for the 1.6.4 version of MCP so I'm assuming it hasn't changed since then. I also directly run the batch files by clicking on them, rather than using an IDE):
Before (only the parts around what was changed are shown):
Also, I'm not sure if you are trying to use the entire recompiled jar from MCP (in mcp\temp) but I took the files in mcp\reobf after running reobfuscate.bat, which only include modified and new classes (note that you cannot distribute a whole working jar as that is against the EULA, so that's another issue, plus this is not a complete jar, I looked in one and it doesn't have an assets folder, so textures and models would all be broken, if the game can even start without all of that data), and add them to an unmodified copy of the original jar, deleting the META-INF folder (essentially the same as installing mods prior to the advent of installers/before the 1.6 launcher, except for the changes to the json).
Otherwise, you need to modify the command line arguments that MCP uses to launch the game (CmdStartClt in mcp\conf\mcp.cfg), or modify the game to add a login method, both of which are detained here (I believe only the second method works in newer versions; in this case you should also do this before making any other changes and run updatemd5.bat so MCP ignores the changes you made when reobfuscating, since otherwise it will reobfuscate it and mess with the default login process):
Thanks. I actually just got it working and I think a posting from you was part of it. There were two things, first the json file as you say. I was trying to copy from fabric but should have used a previous version (the fabric one was simpler so I was hoping to get away with that). This was the thread that helped:
So I got everything decompiled with MCP-reborn with no issues and first step is just to compile a new version of MC with no changes (I'm using Intellij). Runclient brings up Minecraft no problem. Unfortunately, when I go to do multiplayer, it gives me an error (of course) because I'm not starting it through the launcher.
So I took a look at the versions folder for the official launcher. I already have fabric-loader installed so I tried copying the json from that and modifying it with values that were appropriate to my .jar file. Looked good at first but, of course, the launcher had actually overwritten the .jar file with the official one. I figured it had to know which version to replace it with so I took out the "inheritsFrom" line but now it just crashes (exit code 0).
So can anyone tell me how to run my modded client with logging in? It doesn't particularly matter how though obviously, one that integrates with the original launcher would be preferred.I have tried searching for the answer for this but mostly what I've come up with is really old and out-of-date stuff. I'm not even asking for a detailed answer but if anyone can point me in the right direction, it would be much appreciated.
Here is my json file for inspection.
This is the error I get from the launcher. This is odd as it looks to me like this is the class that works for runclient from intellij
[Info: 2020-10-27 00:53:50.4054885: GameCallbacks.cpp(163)] Game/game () Info Error: Could not find or load main class net.minecraft.client.main.Main
In order to create a new custom version you just copy the json from the version that you want to modify and rename it and the "id" inside, then delete the entire "downloads" section which includes "client.jar", which is how I made the json for my own custom version (based on 1.6.4 but all versions work the same, all filenames/paths given are those for the 1.6.4 version of MCP so I'm assuming it hasn't changed since then. I also directly run the batch files by clicking on them, rather than using an IDE):
Before (only the parts around what was changed are shown):
After:
The actual json can be seen here (TMCWv4.5.json, you can view it in the browser, note that it is all one line, as are the original jsons): https://www.dropbox.com/s/ioa73iyby4nl3sg/TMCWv4.5.zip?dl=0
Also, I'm not sure if you are trying to use the entire recompiled jar from MCP (in mcp\temp) but I took the files in mcp\reobf after running reobfuscate.bat, which only include modified and new classes (note that you cannot distribute a whole working jar as that is against the EULA, so that's another issue, plus this is not a complete jar, I looked in one and it doesn't have an assets folder, so textures and models would all be broken, if the game can even start without all of that data), and add them to an unmodified copy of the original jar, deleting the META-INF folder (essentially the same as installing mods prior to the advent of installers/before the 1.6 launcher, except for the changes to the json).
Otherwise, you need to modify the command line arguments that MCP uses to launch the game (CmdStartClt in mcp\conf\mcp.cfg), or modify the game to add a login method, both of which are detained here (I believe only the second method works in newer versions; in this case you should also do this before making any other changes and run updatemd5.bat so MCP ignores the changes you made when reobfuscating, since otherwise it will reobfuscate it and mess with the default login process):
https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-mods/modification-development/2915357-tutorial-how-to-login-using-legit-minecraft
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
Thanks. I actually just got it working and I think a posting from you was part of it. There were two things, first the json file as you say. I was trying to copy from fabric but should have used a previous version (the fabric one was simpler so I was hoping to get away with that). This was the thread that helped:
https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-mods/modification-development/2911748-creating-a-launch-profile-for-my-mod
(Yes, it was you so double thanks)
It *still* wouldn't work after that but different issue. I had to add assets and data folders to the jar. The info for that came from here
https://github.com/Hexeption/MCP-Reborn/issues/41
I used 7z for the same effect
Now it's working. I'll take a look at the rest of your comment in a second but it looks detailed so I just wanted to get this out first.