tutorial:mappings
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tutorial:mappings [2019/05/30 21:41] – [Using mappings] jamieswhiteshirt | 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 | + | === Applying Mojang' |
| + | |||
| + | Since 1.14, Mojang has provided its own official mappings rather than Yarn. Note that unlike Yarn, Mojang Mappings do not include paramater | ||
| + | |||
| + | <code> | ||
| + | dependencies { | ||
| + | [...] | ||
| + | mappings loom.officialMojangMappings() | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Mojang' | ||
| + | |||
| + | === Applying Parchment' | ||
| + | |||
| + | Users of Mojang Mappings may wish to have paramater | ||
| + | |||
| + | < | ||
| + | dependencies { | ||
| + | [...] | ||
| + | | ||
| + | | ||
| + | | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Mojang' | ||
| + | |||
| + | |||
| + | === Applying Custom mappings === | ||
| + | |||
| + | You can use custom [[documentation: | ||
| + | |||
| + | For example, if you have a custom branch of yarn which you want to use for mappings, you can build yarn with " | ||
| + | |||
| + | < | ||
| + | dependencies { | ||
| + | mappings fileTree(dir: | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | 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 | ||
| + | |||
| + | < | ||
| + | mappings | ||
| + | | ||
| + | | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ==== Remapping ==== | ||
| - | Loom's '' | + | Remapping is the process of applying mappings to code, transforming from one set of names to another. Both Java source code and compiled Java code can be remapped. It involves changing the names of references according to the mappings, as well as carefully renaming methods to preserve overrides. It does not change what the code does, although it will affect |
| - | * **The '-dev' jar (the '' | + | [[https:// |
| - | * **Yarn names are only applied in a development environment**. Outside a development environment, only intermediary names exist, meaning | + | |
| ==== 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 39: | 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.1559252511.txt.gz · Last modified: 2019/05/30 21:41 by jamieswhiteshirt