Special Cases - ThisTestUser/MCPFixer GitHub Wiki

Mojang Mappings Below 1.17

Mojang started to release obfuscation maps from 1.14.4. However, my tutorial uses MCP mappings until 1.17. For all versions above 1.14.4 except 1.16.5, follow the below steps to use the official Mojang mappings instead. For 1.16.5 only, follow the tutorial from 1.17 to 1.20.4, except that you do not add the java-objc-bridge library.

Go through the tutorial for 1.13 to 1.16.5 as usual. However, at the config part, do not download MCP mappings. Instead, clone the latest version of MCPConfig and run gradlew :VERSION:makeObfToIntermediate (replace VERSION) to get obf_to_intermediate.tsrg. Then, move that file to mcp940/conf. Note that this does not replace joined.tsrg or any other files you moved from the old version of MCPConfig.

You will also need the client and server obfuscation maps, which you can find at the Minecraft wiki (https://minecraft.wiki/w/Java_Edition_VERSION) for your version. Move them both to mcp940/conf also.

To generate the CSV files, run java -jar fixer.jar -c "YOUR_PATH/mcp940/conf" -mode csv. Now, your decompiled Minecraft code will have Mojang mappings for fields and methods. This method will not allow you to use the Mojang mappings for classes, as the MCP names are defined in the joined.tsrg file as well as the patch files.

Decompiling Snapshots

The tutorial pages provided do not officially support snapshot or pre-release versions. However, you can get it to work with a few extra steps.

First, see if your version can be found in MCPConfig (https://github.com/MinecraftForge/MCPConfig/tree/master/versions). If it isn't there, nothing much can be done, unless you want to create your own mappings and patches.

Once you find it, look for a patches folder as well as joined.tsrg. The joined.tsrg (and constructors.txt for versions before 1.17) is absolutely necessary, while the patches folder is needed to fix compile issues. If the patches folder isn't there, you can try to use patches from a nearby version, but there will be a number of issues in the code to fix. The lack of a patches folder may also indicate other issues (for example, 20w14inf fails to decompile for some classes).

Create a file named gradle.properties in the MCPConfig directory. Inside, paste the line type=snapshot for snapshot versions or type=pre for pre-release versions.

You will need to get the closest release version to your version. When following the tutorial, use that release version to determine what to do, except you would use the MCPConfig files that corresponds to your snapshot/pre-release version. This should work fine, but if it doesn't first look in config.json to see if the commands have changed.

The last thing to note is when you are at the launching step, you need to specify the minimum Java version to make the classpath writing work. An example of this would be java -jar fixer.jar -w PATH_TO_MCP_FOLDER -mode libraries -j 16. Note that a Java version string is accepted, so 1.8 for Java 8 and 17 for Java 17. Remember that the minimum Java version can be found on the wiki, and may not be the same as the Java version you are using.