$git clone https://github.com/Hexeption/MCP-Reborn1.18> Needs JDK 17
| 1 | ## MCP-Reborn [](https://github.com/Hexeption/MCP-Reborn/actions?workflow=Java+CI) |
| 2 | |
| 3 | #### MCP-Reborn is an MCP (Mod Coder Pack) for minecraft for making modded clients for minecraft and researching its code. It is based on MCPConfig and ForgeGradle by MinecraftForge Team. |
| 4 | |
| 5 | ### :warning: WARNING :warning:: You **CANNOT** publish any code generated by this tool. |
| 6 | |
| 7 | ### Supported versions: |
| 8 | 1.13->1.21.11 |
| 9 | |
| 10 | ### Important |
| 11 | 1.17< Needs JDK 16 |
| 12 | |
| 13 | 1.18> Needs JDK 17 |
| 14 | |
| 15 | 1.21> Needs JDK 21 |
| 16 | |
| 17 | ### How to use |
| 18 | |
| 19 | 1. Import the build.gradle in Intellij. |
| 20 | |
| 21 | 2. Run the Gradle "setup" task in the mcp folder in IntelliJ - you may need to select View > Tool Windows > Gradle to get this option. |
| 22 | |
| 23 | <img width="284" alt="373de4ebc77d5079584370dd7fbe8745" src="https://user-images.githubusercontent.com/4052647/46925924-71b7b680-d026-11e8-9c29-e3ed2e43f810.png"> |
| 24 | |
| 25 | This will generate the decompiled source code, which you can now find in the "src" folder in the project. |
| 26 | |
| 27 | 3. Modify the source code as you please. |
| 28 | |
| 29 | 4. To test your modified code, go back to the Gradle tasks list (where you ran setup), and run the "runclient" task. |
| 30 | This will compile your new, modified game and run it, to allow you to test.<br>**Note: You can also run the autogenerated run configuration 'Minecraft'** |
| 31 | |
| 32 | 5. Once you have reached a final result you are happy with, there is a bit of a process to turn it into a JAR file that |
| 33 | can actually run from the game launcher. Go to the "build" folder in the Gradle tasks, and run the "build" task. This |
| 34 | will generate the new executable JAR file in the "build/libs/" directory. |
| 35 | |
| 36 | <img width="266" alt="a647ab0eb336062ffd80c8e053e10266" src="https://user-images.githubusercontent.com/4052647/46925963-a297eb80-d026-11e8-8b02-cb621b559511.png"> |
| 37 | |
| 38 | 6. With that JAR generated, open your Minecraft versions folder. On Linux, this defaults to `~/.minecraft/versions`. On |
| 39 | Windows, it's in `AppData/Roaming/.minecraft/versions`. Find the variant your modded version is based on (that is, if |
| 40 | you modded 1.16.4, find the 1.16.4 folder). Duplicate that folder, and rename it. For me, I was modifying villagers so |
| 41 | I called it "1.16.4_villager_mod". |
| 42 | |
| 43 | 7. Go into that folder and delete the original Minecraft JAR file. Then, rename the JSON file to be identical to the |
| 44 | folder name. For me, that made it "1.16.4_villager_mod.json". |
| 45 | |
| 46 | 8. Using a text editor, find the first instance of "downloads": This tells Minecraft where to obtain the game JAR file. |
| 47 | If you leave this in, Minecraft will automatically download the vanilla JAR. But we want to run your new modded JAR. |
| 48 | So delete everything from that "downloads": through the client, server, and server_mappings headers, which finally end |
| 49 | in `/server.txt"}},`. Once you remove that, this section should hold `"assets": "1.16", "complianceLevel": 1, "id": "1.16.4"`. |
| 50 | The last thing we need to do in this JSON file is to change that ID field to match the name of the folder and the |
| 51 | JSON file. So in this case, we want `"id":"1.16.4_villager_mod"`. |
| 52 | |
| 53 | 9. Now, take your new JAR file from the build/libs/ directory, and copy it into this same version folder, and, for the |
| 54 | final time, rename it to the new name we've been using - 1.16.4_villager_mod.jar. |
| 55 | |
| 56 | 10. Using an archive manager (Ubuntu comes with one built in; Windows users can download 7-Zip), open the base version's |
| 57 | JAR file (in this case, 1.16.4.jar, which you'll find in its folder), and your JAR file. You'll need to copy 4 |
| 58 | files/folders from the base JAR into your new one. |
| 59 | |
| 60 | 1. The folder "assets" |
| 61 | 2. The folder "data" |
| 62 | 3. The file "pack.png" |
| 63 | 4. The file "pack.mcmeta" |
| 64 | |
| 65 | 11. Finally, still in that archive manager, delete the META-INF folder from your new JAR. |
| 66 | |
| 67 | 12. Your files should all be configured now. In the Minecraft launcher (close and reopen it if it's already open), go to |
| 68 | "Installations" in the upper left, and then create a new installation. Name it whatever you |