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/10/10 18:57] – Custom mappings liach | tutorial:mappings [2025/04/05 19:59] (current) – Add docs on layered mappings from Qendolin cassiancc | ||
---|---|---|---|
Line 20: | Line 20: | ||
By changing the mappings in your development environment, | By changing the mappings in your development environment, | ||
- | Loom's '' | + | Loom's '' |
* **The ' | * **The ' | ||
* **Yarn names are only applied in a development environment**. Outside a development environment, | * **Yarn names are only applied in a development environment**. Outside a development environment, | ||
+ | |||
+ | === Mojang' | ||
+ | |||
+ | As of Loom 0.5, you can also use Mojang' | ||
+ | |||
+ | < | ||
+ | dependencies { | ||
+ | [...] | ||
+ | mappings loom.officialMojangMappings() | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Mojang' | ||
=== Custom mappings === | === Custom mappings === | ||
- | 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 39: | Line 52: | ||
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 ==== | ||
- | 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 names used in reflection. | + | 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 names used in [[tutorial:reflection|reflection]]. |
[[https:// | [[https:// |
tutorial/mappings.1570733861.txt.gz · Last modified: 2019/10/10 18:57 by liach