tutorial:migratemappings
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tutorial:migratemappings [2025/10/31 18:21] – cassiancc | tutorial:migratemappings [2025/11/16 00:02] (current) – cassiancc | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ~~REDIRECT> | ||
| + | |||
| ====== Migrating to Yarn or Mojang Mappings in a Java codebase ====== | ====== Migrating to Yarn or Mojang Mappings in a Java codebase ====== | ||
| - | Loom allows semi-automatic updating of the mappings used in a Java codebase. This can be a useful tool for users wishing to keep their codebase up-to-date with the new changes in Yarn, or for users wishing to change to different mappings, including Mojang' | + | Loom allows semi-automatic updating of the mappings used in a Java codebase. This can be a useful tool for users wishing to keep their codebase up-to-date with the new changes in Yarn, or for users wishing to change to different mappings, including Mojang' |
| Loom does not support migrating code written in Kotlin. [[https:// | Loom does not support migrating code written in Kotlin. [[https:// | ||
| - | **Note: | + | **Note: |
| Line 12: | Line 14: | ||
| These instructions cover migration from Yarn to Mojang Mappings. | These instructions cover migration from Yarn to Mojang Mappings. | ||
| - | - You'll need a command to migrate your mappings to Moajng | + | - You'll need a command to migrate your mappings to Mojang |
| - Run the command in the root of your Gradle project, either through the terminal, or by adding it as a run configuration in IntelliJ Idea. | - Run the command in the root of your Gradle project, either through the terminal, or by adding it as a run configuration in IntelliJ Idea. | ||
| - Your migrated sources will appear in '' | - Your migrated sources will appear in '' | ||
| - Copy the sources from '' | - Copy the sources from '' | ||
| - | - If you are coming from Yarn, you can now replace your mappings in your build.gradle with Mojang Mappings (i.e. mappings '' | + | - If you are coming from Yarn, you can now replace your mappings in your '' |
| - Refresh the Gradle project in your IDE. | - Refresh the Gradle project in your IDE. | ||
| - Check and update any Mixin targets that may be outdated. | - Check and update any Mixin targets that may be outdated. | ||
| + | |||
| + | Your dependencies section should now contain this: | ||
| + | |||
| + | |||
| + | dependencies { | ||
| + | [...] | ||
| + | mappings loom.officialMojangMappings() | ||
| + | } | ||
| + | |||
| + | |||
| ===== Migrating to Yarn ===== | ===== Migrating to Yarn ===== | ||
| Line 28: | Line 40: | ||
| - Your migrated sources will appear in '' | - Your migrated sources will appear in '' | ||
| - Copy the sources from '' | - Copy the sources from '' | ||
| - | - Update or add to your gradle.properties file with the Yarn version specified on [[https:// | + | - Update or add to your '' |
| - | - If you are coming from Mojang Mappings, you can now replace your mappings in your build.gradle with Yarn's (i.e. '' | + | - If you are coming from Mojang Mappings, you can now replace your mappings in your '' |
| - Refresh the Gradle project in your IDE. | - Refresh the Gradle project in your IDE. | ||
| - Check and update any Mixin targets that may be outdated. | - Check and update any Mixin targets that may be outdated. | ||
| + | Your dependencies section should now contain this, with the version of Yarn you are using specified in your '' | ||
| + | dependencies { | ||
| + | [...] | ||
| + | mappings " | ||
| + | } | ||
| + | |||
| + | === Migrating Split Sources === | ||
| + | |||
| + | At this time, users of split sources currently need to migrate their main source set with the process above, then do the process again, specifying the path to their client source set. As a reference, the command to migrate a client source set to Mojang Mappings is below. | ||
| + | |||
| + | |||
| + | migrateMappings --mappings " | ||
| === Additional customization === | === Additional customization === | ||
| Line 39: | Line 63: | ||
| * Specify where to output the remapped source with '' | * Specify where to output the remapped source with '' | ||
| * Specify a custom place to retrieve the mappings from with '' | * Specify a custom place to retrieve the mappings from with '' | ||
| - | |||
| - | For more information, | ||
| === Reporting issues === | === Reporting issues === | ||
| Loom uses a fork of [[https:// | Loom uses a fork of [[https:// | ||
tutorial/migratemappings.1761934905.txt.gz · Last modified: 2025/10/31 18:21 by cassiancc