User Tools

Site Tools


tutorial:mappings

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
tutorial:mappings [2019/06/01 18:48] – Add Remapping jamieswhiteshirttutorial:mappings [2019/06/08 13:49] – [Using mappings] There is more than modCompile now jamieswhiteshirt
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 ''mappings'' dependency configuration in the buildscript and can be updated by updating the dependency. Minecraft as well as dependencies included with the ''modCompile'' dependency configuration are remapped with the mapping. Classes, fields and methods that are not mapped in Yarn are given Intermediary names like ''class_1234'', ''method_1234'' and ''field_1234''.+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 ''mappings'' dependency configuration in the buildscript and can be updated by updating the dependency. Minecraft as well as dependencies included with mod-augmented dependency configurations like ''modCompile'' are remapped with the mapping. Classes, fields and methods that are not mapped in Yarn are given Intermediary names like ''class_1234'', ''method_1234'' and ''field_1234''.
  
 <code> <code>
Line 22: Line 22:
 Loom's ''remapJar'' task will produce the primary mod artifact, which is a built jar using intermediary names. Additionally, if a ''sourcesJar'' task is present, ''remapSourcesJar'' will produce a sources jar using intermediary names. These jars can be installed as mods or included in a development environment with the ''modCompile'' dependency configuration. Loom's ''remapJar'' task will produce the primary mod artifact, which is a built jar using intermediary names. Additionally, if a ''sourcesJar'' task is present, ''remapSourcesJar'' will produce a sources jar using intermediary names. These jars can be installed as mods or included in a development environment with the ''modCompile'' dependency configuration.
  
-  * **The '-dev' jar (the ''jar'' task output) does not use intermediary names, and is therefore not useful.** It cannot be installed as a mod outside a development environment and will only work in a development environment with matching mappings. The regular jar (the ''remapJar'' task output) should be used instead and installed in development environments using the ''modCompile'' dependency configuration.+  * **The '-dev' jar (the ''jar'' task output) does not use intermediary names, and is therefore not useful.** It cannot be installed as a mod outside a development environment and will only work in a development environment with matching mappings. The regular jar (the ''remapJar'' task output) should be used instead and installed in development environments using mod-augmented dependency configurations like ''modCompile''.
   * **Yarn names are only applied in a development environment**. Outside a development environment, only intermediary names exist, meaning the code will not match exactly what you see and wrote. Loom transparently handles this transition for you, but be cautious when using reflection.   * **Yarn names are only applied in a development environment**. Outside a development environment, only intermediary names exist, meaning the code will not match exactly what you see and wrote. Loom transparently handles this transition for you, but be cautious when using reflection.
  
tutorial/mappings.txt · Last modified: 2022/05/22 08:38 by daomephsta