tutorial:mappings
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
tutorial:mappings [2019/05/30 11:42] – [Using mappings] jamieswhiteshirt | tutorial:mappings [2021/11/18 00:59] – [Remapping] liach | ||
---|---|---|---|
Line 9: | Line 9: | ||
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. | 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. | ||
- | 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 '' | + | 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 '' |
< | < | ||
Line 22: | Line 22: | ||
Loom's '' | Loom's '' | ||
- | * **The output of '' | + | * **The '-dev' jar (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 === | ||
+ | |||
+ | You can use custom tiny mappings for Fabric Loom for your Gradle project setup. | ||
+ | |||
+ | 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 " | ||
+ | |||
+ | ==== 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 [[tutorial: | ||
+ | |||
+ | [[https:// | ||
==== Obfuscation and deobfuscation ==== | ==== Obfuscation and deobfuscation ==== | ||
Line 33: | Line 67: | ||
==== Intermediary ==== | ==== Intermediary ==== | ||
- | A property of Minecraft' | + | A property of Minecraft' |
+ | |||
+ | Java code may be compiled for one version of a library and still work with another, making the two versions of the library binary compatible. Put simply, binary compatibility is achieved if the library exposes at least the same classes with the same methods and fields with the same names. The inconsistency in Minecraft' | ||
- | Intermediary | + | Intermediary |
- | Being a stable mapping, Intermediary can make Minecraft's API allow binary | + | Being a stable mapping, Intermediary can make Minecraft binary |
tutorial/mappings.txt · Last modified: 2022/05/22 08:38 by daomephsta