Ravel is a plugin for IntelliJ IDEA to remap source files, based on IntelliJ's PSI and Mapping-IO. It supports remapping Java, Kotlin, Mixins (written in Java), Class Tweaker, and Access Wideners.
Install it from JetBrains Marketplace or download the ZIP file from GitHub Releases and install it by clicking the gear icon on the plugin settings and clicking Install Plugin From Disk.

Migrating Mappings
WARNING
Commit any changes before attempting to remap your sources!
Prerequisites
First, you need to get your mappings. For remapping from Yarn to Mojang Mappings or vice versa, you need to download both of them.
- Find and download Yarn mappings, choose the
mergedv2.jar, extract it as a ZIP. The mappings is inmappings/mappings.tinyfile. - Download Mojang mappings by searching for your Minecraft version, open the JSON url, search for
client_mappings, and download theclient.txt
Remapping
Next, right click on a file open in the Editor and choose Refactor > Remap Using Ravel

A dialog like this will open. You can also open the dialog by clicking Refactor from the top menu.

Next, add the mappings by clicking the + icon.
- For migrating from Yarn to Mojang Mappings, add the Yarn
mappings.tinyfile first, choosenamedas the source namespace andofficialas the destination namespace. Then, add the Mojangclient.txtfile and choosetargetas the source namespace andsourceas the destination namespace. - For migrating from Mojang Mappings to Yarn, add the Mojang
client.txtfirst, this time choosingsourceas the source andtargetas the destination. Then, add the Yarnmappings.tinyand chooseofficialas the source andnamedas the destination.
Then, select the modules that you want to remap by clicking the + icon, or the icon on its left to add all modules.
Then, click OK and wait for it to finish remapping.
Updating Gradle
After the remapping finished, replace your mappings in your mod's build.gradle.
groovy
dependencies {
mappings "net.fabricmc:yarn${project.yarn_mappings}:v2"
mappings loom.officialMojangMappings()
// Or the reverse if you're migrating from Mojang Mappings to Yarn
}1
2
3
4
5
2
3
4
5
Also update your gradle.properties, remove yarn_mappings option or update it to the one you use.
properties
yarn_mappings=1.21.10+build.2 1
Final Changes
That's the bulk of the work done! You'll now want to go through your source code to check for any potentially outdated Mixin targets or code that was not remapped.
For problems that are detected by Ravel, you can search (Ctrl+Shift+F) for TODO(Ravel).

Tools like mappings.dev or Linkie will be helpful to familiarize yourself with your new mappings.


