tutorial:mappings
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tutorial:mappings [2022/05/22 08:38] – Clarify correct build task daomephsta | tutorial:mappings [2026/03/01 23:56] (current) – Status updating on mappings cassiancc | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ==== Introduction ==== | ==== Introduction ==== | ||
| - | Mappings | + | Mappings |
| ==== Using mappings ==== | ==== Using mappings ==== | ||
| - | In Loom, the mappings define the names for Minecraft classes, fields and methods used in your development environment. These names may vary from one development environment to another depending on the installed mappings. | + | When using a variant of Loom that supports remapping, the mappings define the names for Minecraft classes, fields and methods used in your development environment. These names may vary from one development environment to another depending on the installed mappings. |
| - | Yarn is the default mapping used by Loom. Yarn gradually improves and receives new releases as contributions are accepted. | + | Mappings in Loom are specified using the '' |
| + | |||
| + | By changing the mappings in your development environment, | ||
| + | |||
| + | Loom's '' | ||
| + | |||
| + | * **The ' | ||
| + | * **These names are only applied in a development environment**. Outside a development environment, | ||
| + | |||
| + | === Applying Fabric' | ||
| + | |||
| + | Yarn was a community developed mapping set that was the default for Fabric users from Fabric' | ||
| < | < | ||
| Line 18: | Line 29: | ||
| </ | </ | ||
| - | By changing the mappings in your development environment, | + | === Applying Mojang's mappings |
| - | Loom's '' | + | Since 1.14, Mojang has provided its own official mappings rather than Yarn. Note that unlike Yarn, Mojang Mappings do not include paramater names or Javadocs. If you are referencing newer tutorials, prefer the names, or plan to upgrade your mod to 26.1 or above, you can apply it like this: |
| - | * **The ' | + | < |
| - | * **Yarn names are only applied in a development environment**. Outside a development environment, | + | dependencies { |
| + | [...] | ||
| + | | ||
| + | } | ||
| + | </code> | ||
| - | === Mojang' | + | Mojang' |
| - | As of Loom 0.5, you can also use Mojang's official | + | === Applying Parchment' |
| + | |||
| + | Users of Mojang Mappings may wish to have paramater names and Javadocs. For that purpose, third party projects like [[https:// | ||
| < | < | ||
| dependencies { | dependencies { | ||
| [...] | [...] | ||
| - | | + | mappings loom.layered() { |
| + | officialMojangMappings() | ||
| + | | ||
| + | } | ||
| } | } | ||
| </ | </ | ||
| Line 39: | Line 59: | ||
| - | === Custom mappings === | + | === Applying |
| - | You can use custom tiny mappings for Fabric Loom for your Gradle project setup. | + | You can use custom |
| For example, if you have a custom branch of yarn which you want to use for mappings, you can build yarn with " | For example, if you have a custom branch of yarn which you want to use for mappings, you can build yarn with " | ||
| Line 52: | Line 72: | ||
| You can change the directory where you put mapping to have any custom name; just change the name in " | You can change the directory where you put mapping to have any custom name; just change the name in " | ||
| + | |||
| + | You can also use layered mappings to override specific mappings, see the following: | ||
| + | |||
| + | < | ||
| + | mappings loom.layered { | ||
| + | | ||
| + | | ||
| + | } | ||
| + | </ | ||
| ==== Remapping ==== | ==== Remapping ==== | ||
| Line 61: | Line 90: | ||
| ==== Obfuscation and deobfuscation ==== | ==== Obfuscation and deobfuscation ==== | ||
| - | Releases of Minecraft Java Edition are obfuscated jar files, which means they are compiled binaries stripped of any meaningful naming information, | + | Releases of Minecraft Java Edition |
| - | Mappings like Yarn provide | + | Mappings like Yarn provided |
| ==== Intermediary ==== | ==== Intermediary ==== | ||
| Line 73: | Line 102: | ||
| Intermediary defines stable names for Minecraft' | Intermediary defines stable names for Minecraft' | ||
| - | Being a stable mapping, Intermediary can make Minecraft binary compatible across multiple versions (such as snapshot versions)! Compatibility is guaranteed only for the parts of the game that are unchanged between versions. When installed outside a development environment, | + | Being a stable mapping, Intermediary can make Minecraft binary compatible across multiple versions (such as snapshot versions)! Compatibility is guaranteed only for the parts of the game that are unchanged between versions. When installed |
tutorial/mappings.1653208728.txt.gz · Last modified: 2022/05/22 08:38 by daomephsta