Skip to content

Instantly share code, notes, and snippets.

@SizableShrimp
Last active January 20, 2023 04:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SizableShrimp/252bcd6d7bf97276781fce99a00c9eb9 to your computer and use it in GitHub Desktop.
Save SizableShrimp/252bcd6d7bf97276781fce99a00c9eb9 to your computer and use it in GitHub Desktop.
How to remap your mod to include Forge's 1.19 renames

How to remap your mod to include Forge's 1.19 renames

Forge versions 41.0.64 and 41.0.94 for Minecraft 1.19 together bring a large overhaul to rendering along with general renames to many older fields, methods, and classes that were previously based on MCP names. Together, these changes have broken almost all mods written for any older versions of Forge 1.19 or lower.

However, the Forge team has created a tool to aid modders in automatically remapping their mods to be in line with the renames. This tool has been designed with the future in mind. This means you should be able to use it starting from any Minecraft/Forge version (on FG5) on the way to porting to any future Minecraft/Forge versions (1.19+ / 41.0.94+).

Note: This does not port your mod for you. However, it greatly helps in automating parts that would otherwise be tedious.

The tool that must be used for this process is called the Forge Updates Remapper and can be found at https://github.com/SizableShrimp/ForgeUpdatesRemapper. You should follow the README on the repository for setup instructions.

Your code must compile as-is! This means you must start on a lower version of Forge where your mod compiles for this script to work. Any version works (although 1.17+ is necessary to get the most benefit).

When it comes to what URLs to provide to this tool, you should provide the following two URLs:

https://gist.githubusercontent.com/SizableShrimp/882a671ff74256d150776da08c89ef72/raw/forge_1.19_renames.tsrg
https://gist.githubusercontent.com/amadornes/e00ea624b3cccc84fbca0800f651b546/raw/raw_mappings.tsrg

The full line to execute should look something like this (it's a long one). You will likely need to prepend gradlew with ./ on Linux and macOS.

gradlew -PUPDATE_SRGS=https://gist.githubusercontent.com/SizableShrimp/882a671ff74256d150776da08c89ef72/raw/forge_1.19_renames.tsrg;https://gist.githubusercontent.com/amadornes/e00ea624b3cccc84fbca0800f651b546/raw/raw_mappings.tsrg updateEverything

After setting up the tool and running this, your mod should now have all Forge 1.19 renames applied. This does not include refactors where code was changed/improved/deleted/added, which you will have to handle yourself. Your code will not compile after using this tool! The next step is to update your Forge version and mappings and see how much left you have to update to port your mod. Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment